Advertisement
Mori007

Slicingteam_name

May 9th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Slicing to 3 word of teams
  2.  
  3. teams = ["WOLVES", "OWLS", "PANTHERS", "BEARS", "DRAGONS"]
  4.  
  5. team_short = [] # create new list that Its save the abbreviated team
  6.  
  7. for m in teams: # Iterates and take the first 3 letter name of teams
  8. team_short.append(m[:3])
  9.  
  10. print(team_short) # print the new teams name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement