Skip to content

Instantly share code, notes, and snippets.

@mekhami
Created December 17, 2015 22:18
Show Gist options
  • Select an option

  • Save mekhami/51a00b41ded1f021f507 to your computer and use it in GitHub Desktop.

Select an option

Save mekhami/51a00b41ded1f021f507 to your computer and use it in GitHub Desktop.
def random_player():
if random.randint(0,1) == 0:
return 'x'
else:
return 'y'
player1 = random_player()
if player1 = 'x':
player2 = 'y'
else:
player2 = 'x'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment