We have changed our list by adding two more items to the end of it. We add an integer, 7
and a new string, "quail"
. Each is still separated by a comma:
my_list = ["cat", "dog", "horse", 7, "quail"]
print(my_list)
python list.py
Here we edit our list so that the items are all in a different order:
my_list = ["quail", "cat", 7, "dog", "horse"]
print(my_list)
python list.py