USING PYTHON
Make a list of players from the user. Write a program to create two teams randomly selected from the list.
Answers
Answered by
1
from random import shuffle
players = input("enter names: ").split()
shuffle(players)
mid_idx = len(players) // 2
team_1 = players[:mid_idx]
team_2 = players[mid_idx:]
print(team_1, team_2)
Similar questions