1my_list = ["pizza", "soda", "muffins"]
2
3my_list[0] # outputs "pizza"
4my_list[-1] # outputs the last element of the list which is "muffins"
5my_list[:] # outputs the whole list
6my_list[:-1] # outputs the whole list except its last element
7
8# you can also access a string's letter like this
1#to get the LAST item out of a list:
2things = ["apple", "book", 3, ["another list", 85], "orange"]
3last = things.pop()
4print(last)
5#it should output "orange"
1list1 = ['physics', 'chemistry', 1997, 2000]
2list2 = [1, 2, 3, 4, 5, 6, 7]
3
4print("list1[0]: ", list1[0])
5print("list2[1:5]: ", list2[1:5])
6
7# Test Results:
8list1[0]: physics
9list2[1:5]: [2, 3, 4, 5]