Last active
October 25, 2017 05:18
-
-
Save omuomugin/276ef6c72e29e765e82fbecc816c068b to your computer and use it in GitHub Desktop.
python why elif not else if
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
if condition: | |
# do something | |
else condition1: | |
if condition2: | |
# else-if 1 | |
else condition3: | |
if condition4: | |
# else-if 2 | |
if condition: | |
# do something | |
elif condition2: | |
# else-if 1 | |
elif condition4: | |
# else-if 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment