Created
December 4, 2013 16:24
-
-
Save JoFrhwld/7790531 to your computer and use it in GitHub Desktop.
just playing around with python's `None` and how it interacts with logical comparisons.
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
theKingOfFrance = None | |
bald = ["JeanLucPicard", "StoneColdSteveAustin"] | |
print("Jean: The King of France is bald.") | |
if theKingOfFrance in bald: | |
print("Jaques: It's true!") | |
elif theKingOfFrance not in bald: | |
print("Jaques: It's false!") | |
print("") | |
print("France's throne is held by %s." % theKingOfFrance) | |
print("To say there is no King of France is %s." % (not theKingOfFrance)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment