Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Slicing to 3 word of teams
- teams = ["WOLVES", "OWLS", "PANTHERS", "BEARS", "DRAGONS"]
- team_short = [] # create new list that Its save the abbreviated team
- for m in teams: # Iterates and take the first 3 letter name of teams
- team_short.append(m[:3])
- print(team_short) # print the new teams name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement