summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorven <vendethiel@hotmail.fr>2016-06-16 15:19:43 +0200
committerGitHub <noreply@github.com>2016-06-16 15:19:43 +0200
commit5affe64801a241c2307a3b2ec6950d1dc41f531b (patch)
tree367fe0f4548f4c2add808d19b7e47ad3192dd972
parentb3b5ece63ce00ed5983374b91d150515c5a90f69 (diff)
String length by #1742
-rw-r--r--python3.html.markdown3
1 files changed, 3 insertions, 0 deletions
diff --git a/python3.html.markdown b/python3.html.markdown
index 2e37fccb..0f5da8f1 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -119,6 +119,9 @@ b == a # => True, a's and b's objects are equal
# 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
+
# .format can be used to format strings, like this:
"{} can be {}".format("Strings", "interpolated") # => "Strings can be interpolated"