diff options
author | ven <vendethiel@hotmail.fr> | 2016-06-16 15:18:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-16 15:18:30 +0200 |
commit | b3b5ece63ce00ed5983374b91d150515c5a90f69 (patch) | |
tree | 9e37e9eee214e9c334d75743fd3db94a4c4f8cef | |
parent | d82da8357c526a738b7bfda3d44f2e34c423ea7d (diff) |
String length by @thesourabh
-rw-r--r-- | python.html.markdown | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python.html.markdown b/python.html.markdown index 28b0a7ae..fa604455 100644 --- a/python.html.markdown +++ b/python.html.markdown @@ -126,6 +126,9 @@ not False # => True # A string can be treated like a list of characters "This is a string"[0] # => 'T' +# You can find the length of a string +len("This is a string") # => 16 + #String formatting with % #Even though the % string operator will be deprecated on Python 3.1 and removed #later at some time, it may still be good to know how it works. |