Skip to content

Instantly share code, notes, and snippets.

@johnludwigm
Last active February 6, 2018 12:32
Show Gist options
  • Save johnludwigm/49e2a7f811510fae4f47b9ba83d57398 to your computer and use it in GitHub Desktop.
Save johnludwigm/49e2a7f811510fae4f47b9ba83d57398 to your computer and use it in GitHub Desktop.
Python riddle.
#February 6, 2018
#1. Give the return value of the following expression:
>>> 1, 2, 3, 4 == (1, 2, 3, 4)
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
##############
#Answers:
#1. Give the return value of the following expression:
>>> 1, 2, 3, 4 == (1, 2, 3, 4)
####
#By associativity, this is equivalent to entering:
>>> 1, 2, 3, (4 == (1, 2, 3, 4))
#Which evaluates to:
(1, 2, 3, False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment