mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
String length by @thesourabh
This commit is contained in:
parent
d82da8357c
commit
b3b5ece63c
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user