Advertisement
g0thy

Teams_short

Dec 10th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. teams = ["WOLVES", "OWLS", "PANTHERS", "BEARS", "DRAGONS"]
  2.  
  3. teams_short = []
  4.  
  5. #Contract all teams to first 3 characters
  6. teamsLen = len(teams)
  7. for teamShort in teams:
  8.     teams_short.append(teamShort[:3])
  9.  
  10. print('Shortened team names: ', teams_short)    #Print out results
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement