Roster changes
Crews change: someone new joins, a backup steps in, someone leaves for another mission. The roster has to follow every change, in the right order, because position 1 is the deputy commander's place.
Apply today's changes to the list, then reassign the newest member to the station.
Finish stage 1 to unlock this stage.
Apply the changes in this order: add the new member at the end, insert the backup at position 1, remove the one who is leaving. Then print the roster and its size:
Roster: Okafor, Haddad, Lindqvist, Kowalska, Moreau Crew size: 5
crew.append(x) adds at the end, crew.insert(1, x) puts x at index 1, and crew.remove(x) deletes it. Use the variables, not the names.
Finish stage 1 to unlock this stage.
After the changes, the newest member, now last in the list, is reassigned to the space station. Take them out with pop(), which gives the removed item back, and print who it was before the roster:
Reassigned: Moreau Roster: Okafor, Haddad, Lindqvist, Kowalska Crew size: 4
Hints
List Methods - append, insert, pop
# List methods that change the list in place
# Observatories lined up to follow up an alert
followup = ["ZTF", "Gemini South", "ALMA"]
print("Queue:", followup)
# append() adds one item to the end
followup.append("Keck")
print("After append:", followup)
# insert() takes the position first, then the value
followup.insert(0, "Swift")
print("After insert:", followup)
# pop() removes the last item and hands it back
dropped = followup.pop()
print("Clouded out:", dropped)
# pop(0) takes from the front - this is how you work a queue
observing_now = followup.pop(0)
print("Observing now:", observing_now)
print("Still waiting:", followup)
# These methods return None, not a new list
print("What append gives back:", followup.append("VLT"))
# clear() empties the list, the list itself survives
followup.clear()
print("Alert closed:", followup, "left in queue:", len(followup))
Separate arguments with commas. They're passed on every Run as sys.argv[1:].