From b3b5ece63ce00ed5983374b91d150515c5a90f69 Mon Sep 17 00:00:00 2001 From: ven Date: Thu, 16 Jun 2016 15:18:30 +0200 Subject: [PATCH] String length by @thesourabh --- python.html.markdown | 3 +++ 1 file changed, 3 insertions(+) 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.