Created
February 9, 2020 14:53
-
-
Save master-stm/eeda463469721a0d87076e169ffa6ce5 to your computer and use it in GitHub Desktop.
Takes a number from user and create a list with user's input. takes names from user and creates a team randomly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
n = int(input("How many players? ")) | |
players_list = [] | |
for i in range(n): | |
name= input(f"Enter player no. {i+1} : ") | |
players_list.append(name) | |
d = int(len(players_list)/2) | |
print(random.choices(players_list, k=d)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment