Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import shuffle
- teamA=[]
- teamB=[]
- players=["Chiara", "Alessandra", "Giovanna", "Giulia", "Benedetta", "Livia", "Alberta", "Maria"]
- def add_player_to_team(team):
- team_players=0
- while team_players <4:
- shuffle(players)
- player_picked = players.pop()
- team.append(player_picked)
- team_players=team_players+1
- add_player_to_team(teamA)
- add_player_to_team(teamB)
- print("Team A:")
- for player_picked in teamA:
- print(player_picked)
- print(" ")
- print("Team B:")
- for player_picked in teamB:
- print(player_picked)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement