mylist = ['apples','bananas', 'oranges'] #1 len(mylist) #2
How this works - Line by Line
mylist = ['apples','bananas', 'oranges'] #1
Defining mylist as a example list of items
len(mylist) #2
This line returns the count of items in the list. In this case, the result would be 3.
No comments:
Post a Comment