listName = [1,2,3,4]
# Create a list new_list = [] # Add items to the list item1 = "string1" item2 = "string2" new_list.append(item1) new_list.append(item2) # Access list items print(new_list[0]) print(new_list[1])
#creating a list create_list = ["apple", "banana", "cherry"] print(create_list)
myList = [value,value,value] #note that you can use any amount of value #you don not have to use value
# empty list my_list = [] # list of integers my_list = [1, 2, 3] # list with mixed data types my_list = [1, "Hello", 3.4]
list = [1, 2, 4, 5, 6]
list = [1, 2, 3, 4, 5, 6, 7]
shamsuddeen
# list with numbers list = [10, 20, 30] # list with strings list = ["john", "kai", "albert"] # mixed data list = ["john",1 ,True ]