Botontam

soccer_team

May 11th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. from random import choice
  2.  
  3. teamA= []
  4. teamB= []
  5.  
  6. players = ['Messi', 'Ronaldo', 'Maradona', 'Pele', 'Kempes', 'Caniggia']
  7.  
  8. def add_player_to_team (team):
  9. player_picked=choice (players)
  10. team.append (player_picked)
  11. players.remove (player_picked)
  12.  
  13. for players in range (int(len(players)/2)):
  14. add_player_to_team (teamA)
  15. add_player_to_team (teamB)
  16.  
  17. print (teamA)
  18. print (teamB)
Add Comment
Please, Sign In to add comment