Skip to content

Instantly share code, notes, and snippets.

@blast-hardcheese
Forked from anonymous/gist:2020491
Created March 12, 2012 08:09
Show Gist options
  • Save blast-hardcheese/2020658 to your computer and use it in GitHub Desktop.
Save blast-hardcheese/2020658 to your computer and use it in GitHub Desktop.
def countdown(a):
for i in a:
print a - i
if i == 3:
print "blast off!"
break
i+=1
countdown(3):
@blast-hardcheese
Copy link
Author

def countdown(a):    
    for i in range(a, 0, -1):
        print i
    print "blast off!"

countdown(3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment