John
0
Q:

len python 3

mystring = 'Hello'
#Counts the amount of letters in the string
len(mystring)	# = 5	

#Can also count the number of items in a list
mylist = ['Hello', 'Goodbye', 'Morning']
len(mylist)		# = 3
6
len(list) # returns the length of a list, tuple, string, etc.
1

New to Communities?

Join the community