Created
March 21, 2012 20:37
-
-
Save tdsmith/2152650 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
darkside:Desktop tim$ python uh2.py | |
outer | |
inner | |
inner | |
inner | |
outer | |
inner | |
inner | |
inner | |
outer | |
inner | |
inner | |
inner | |
*** | |
outer | |
inner | |
inner | |
inner | |
outer | |
inner | |
inner | |
inner | |
outer | |
inner | |
inner | |
inner | |
***** | |
outer | |
inner | |
inner | |
inner | |
outer | |
inner | |
inner | |
inner | |
outer | |
inner | |
inner | |
inner |
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
#!/usr/bin/python | |
i = 0 | |
while True: | |
j = 0 | |
print 'outer' | |
while True: | |
print '\tinner' | |
j += 1 | |
if j == 3: break | |
i += 1 | |
if i == 3: break | |
print '\n***\n' | |
i = 0 | |
while True: | |
j = 0 | |
print 'outer' | |
while True: | |
try: | |
print '\tinner' | |
j += 1 | |
if j == 3: raise Exception('lolz') | |
except Exception, e: | |
break | |
i += 1 | |
if i == 3: break | |
print '\n*****\n' | |
i = 0 | |
while True: | |
j = 0 | |
print 'outer' | |
try: | |
while True: | |
print '\tinner' | |
j += 1 | |
if j == 3: raise Exception('lulzier') | |
except Exception, e: | |
pass | |
i += 1 | |
if i == 3: break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment