Last active
December 5, 2019 01:51
-
-
Save FerdinaKusumah/e2a02b57538e3b382d9eacc012ecdfa6 to your computer and use it in GitHub Desktop.
For else
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
"""For else""" | |
a = [1, 2, 3, 4] | |
# Search number in list | |
search_num = 10 | |
for num in a: | |
if num > search_num: | |
break | |
else: | |
print("Sorry but number you're trying to find is not found") | |
# Sorry but number you're trying to find is not found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment