Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sorteiaGrupo(n):
- import random
- Pessoas = ['Iberê', 'Leonardo', 'Marcelo', 'Alex', 'Kauan']
- Grupo_1=[]
- Grupo_2=[]
- while len(Grupo_1) <n:
- Integrante = random.choice(Pessoas)
- Grupo_1.append(Integrante)
- Pessoas.remove(Integrante)
- Grupo_1.sort()
- print ('Grupo 1:', Grupo_1)
- print ('Grupo 2:', Pessoas)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement