Skip to content

Commit d883406

Browse files
committed
explain len() in a better place
1 parent dc892b3 commit d883406

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lists-and-tuples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ There's many things [we can do with strings](handy-stuff-strings.md),
5353
and some of these things also work with lists.
5454

5555
```py
56-
>>> len(names) # we have 5 names
56+
>>> len(names) # len is short for length, we have 5 names
5757
5
5858
>>> names + ['Akuli'] # create a new list with me in it
5959
['wub_wub', 'theelous3', 'RubyPinch', 'go|dfish', 'Nitori', 'Akuli']

loops.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ We could also create an index variable, and use a while loop:
178178

179179
```py
180180
>>> stuff = ['hello', 'hi', 'how are you doing', 'im fine', 'how about you']
181-
>>> length_of_stuff = len(stuff) # len is short for length, len(stuff) is 5
181+
>>> length_of_stuff = len(stuff)
182182
>>> index = 0
183183
>>> while index < length_of_stuff:
184184
... print(stuff[index])

0 commit comments

Comments
 (0)