Tom_Jung

Untitled

Jan 25th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. from random import choice
  2. teamA = []
  3. teamB = []
  4.  
  5. players = ['Harry', 'Hermione', 'Neville', 'Ginny']
  6.  
  7. def add_player_to_team(team):
  8.  
  9. for i in range(2):
  10. player_picked = choice(players)
  11. team.append(player_picked)
  12. players.remove(player_picked)
  13.  
  14. add_player_to_team(teamA)
  15. print(teamA)
  16. add_player_to_team(teamB)
  17. print(teamB)
Advertisement
Add Comment
Please, Sign In to add comment