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
word = 'ravenclaw' | |
house = \ | |
'Gryffindor' if 'gryffindor' in word else \ | |
'Hufflepuff' if 'hufflepuff' in word else \ | |
'Ravenclaw' if 'ravenclaw' in word else \ | |
'Slytherin' if 'slytherin' in word else \ | |
'some default value' | |
print house |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment