All right, it's time to wrap things up!
List definitions require elements separated with commas inside square brackets:
invited_guests = ['Mark', 'Hannah', 'Walter']
List elements are accessed with square brackets. Indexing starts at 0.
# first element
# first and second element
To add a new element:
# way one
# way two
invited_guests + ['New Guest']
To delete an element from a list:
# when you know the index
# when you know the value
To iterate over a list:
# when you don't need the index
for guest in invited_guests:
# when you need the index
for guest in range (0, len(invited_guests)):
Lists can be used as function arguments. They can also be returned from functions.
Alright, it's time for a short quiz!