HomeAbout

What is a list

len()

len() function returns the number of items in a list.

mylist = ["apple", "banana", "cherry"] x = len(mylist)

Returns number of characters in a string.

mylist = "Hello" x = len(mylist)
AboutContact