Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #from random import choice
- from random import shuffle
- from random import sample
- teamA = []
- teamB = []
- players = ['Alpha', 'Bravo', 'Charlie', 'Delta', 'Echo', 'Foxtrot', 'Golf', 'Hotel', 'India', 'Juliet', 'Kilo', 'Lima', 'Mike', 'November', 'Oscar', 'Papa', 'Qubec', 'Romeo', 'Sierra', 'Tango', 'Uniform', 'Victor', 'Whiskey', 'Xray', 'Yankee', 'Zulu']
- def add_players_to_team():
- players_picked = sample(players, int(playersLen/2))
- teamA.append(players_picked)
- def removeTeamA(): #Attempt 1
- lenA = len(teamA)
- for item in teamA:
- players.remove(str(item))
- #teamB.append(players)
- def syncTeamB(): #Attempt 2
- teamB=(players - teamA)
- playersLen = len(players) #How many players?
- add_players_to_team()
- #removeTeamA()
- syncTeamB()
- print('Team A= ', teamA) #printout the teams
- print('Team B= ', teamB)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement