Advertisement
timber101

team name shortener

Dec 24th, 2020
1,129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. #  create code that shortens a team name
  2.  
  3. teams = ["WOLVES", "OWLS", "PANTHERS", "BEARS", "DRAGONS"]
  4.  
  5. team_code = []
  6.  
  7. for team in teams:
  8.     team_code.append(team[:3] + team[-1])
  9.  
  10. print(team_code)
  11. print(teams)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement