Advertisement
kevinbocky

teams_short.py

Jan 26th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #write code to take 1st 3 letters of a team name and then add them to new list
  2. teams = ["WOLVES", "OWLS", "PANTHERS", "BEARS", "DRAGONS"]
  3. teams_short = []
  4.  
  5.  
  6. for name in teams:
  7. teams_short.append(name[0:3])
  8. print(name[0:3])
  9.  
  10. print(teams_short)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement