Code Monsters Academy
Home › Course contents › Level 3 - New Members
append and len

Level 3 - New Members

Chapter 2 · Monster League

team.append(...) adds a new member to the end of the list; len(team) counts how many are in it:

team = ["{PET}"]
team.append("Reefclaw")
print(len(team))   # 2
GoalAdd "Boulshell" and "Blazursa" too, then say how many members the team has.
TipEach append adds one member.
Starting code
team = ["{PET}", "Reefclaw"]
# Use append to add "Boulshell" and "Blazursa"

# Say how many members the team has
Practise this in the game
← Previous levelLevel 2 - Which Member?Next level →Level 4 - Roll Call