1mystring = 'Hello'
2#Counts the amount of letters in the string
3len(mystring) # = 5
4
5#Can also count the number of items in a list
6mylist = ['Hello', 'Goodbye', 'Morning']
7len(mylist) # = 3
1# to get the length of a string or array, use the len() method
2my_string = "Hello World"
3my_list = ["apple", "banana", "orange"]
4
5print(len(my_string)) # outputs 11
6print(len(my_list)) # outputs 3