Last active
April 24, 2024 08:32
-
-
Save zeljic/c03eb5e6946d77311cbea4e91e18e715 to your computer and use it in GitHub Desktop.
Randomize teams
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 | |
import sys | |
def main(names): | |
random.shuffle(names) | |
print('\033[93m' + 'Team 1: ' + ', '.join(names[:(len(names) // 2)]) + '\n\033[92mTeam 2: ' + ', '.join(names[(len(names) // 2):]) + '\033[0m') | |
if __name__ == '__main__': | |
main(sys.argv[1:]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment