Created
April 8, 2014 11:40
-
-
Save sanfx/10112791 to your computer and use it in GitHub Desktop.
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
week = ['Sun', 'Mon', 'Tue', 'Wed', 'Thurs', 'Fri'] | |
print "If you break out of For else doesnt execute becuase its a part of for loop." | |
print "Enter something/ some single letter." | |
var = raw_input('>>') | |
msg = '' | |
for day in week: | |
print day | |
if day.endswith(var): | |
break | |
msg = "No day ends with %s" % var | |
else: | |
print 'Weekend' | |
print msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment