TOPIC 5: Python Lists
4. List length, List Items & Data Types
List Length
To determine the number of items in a list, use the len() function.
Example:
thislist = ["apple", "banana", "cherry"]
print(len(thislist))
Output:
3
List Items and Data Types
List items can be of any data type.
String List
list1 = ["apple", "banana", "cherry"]
Integer List
list2 = [1, 5, 7, 9, 3]
Boolean List
list3 = [True, False, False]