diff options
-rw-r--r-- | docs/markdown/Syntax.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md index 33b06cb..897d55b 100644 --- a/docs/markdown/Syntax.md +++ b/docs/markdown/Syntax.md @@ -253,6 +253,11 @@ s = s.replace('as', 'are') define = ' -Dsomedefine ' stripped_define = define.strip() # 'stripped_define' now has the value '-Dsomedefine' + +# You may also pass a string to strip, which specifies the set of characters to +# be removed. +string = 'xyxHelloxyx'.strip('xy') +# 'string' now has the value 'Hello' ``` #### .to_upper(), .to_lower() |