Last active
February 6, 2018 12:32
-
-
Save johnludwigm/49e2a7f811510fae4f47b9ba83d57398 to your computer and use it in GitHub Desktop.
Python riddle.
This file contains hidden or 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
#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