Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. # Derive abbreviations for the names given
  2.  
  3. teams = ['wolves', 'bears', 'dragons', 'lions', 'owls', 'panthers']
  4.  
  5. team_shortnames = []
  6. i = 0
  7.  
  8. for item in teams:
  9. name = teams[i]
  10. team_shortnames.append(name[:3])
  11. i = i + 1
  12.  
  13. print(team_shortnames)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement