I am trying to assign two random teams out of 16 to a random person out of 8 for a draw for the euros
Here is what i have:
import random
person = ['Ashton', 'Danny', 'Martin', 'Yves', 'Nick', 'Cormac', 'Thierry', 'Ciaran']
team = ['France', 'Switzerland', 'England', 'Slovakia', 'Germany', 'Ukraine', 'Spain', 'Czech Republic', 'Croatia', 'Italy', 'Republic of Ireland', 'Sweden', 'Russia', 'Wales', 'Belgium']
namesTeams = {}
for x in person:
teamName = team[random.randint(0, len(team) -1)]
namesTeams[x] = teamName
team.remove(teamName)
print(namesTeams)
Aucun commentaire:
Enregistrer un commentaire