Skip to content

Instantly share code, notes, and snippets.

@zeljic
Last active April 24, 2024 08:32
Show Gist options
  • Save zeljic/c03eb5e6946d77311cbea4e91e18e715 to your computer and use it in GitHub Desktop.
Save zeljic/c03eb5e6946d77311cbea4e91e18e715 to your computer and use it in GitHub Desktop.
Randomize teams
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