Skip to content

Instantly share code, notes, and snippets.

@mahmoudhossam
Created December 11, 2011 16:39
Show Gist options
  • Save mahmoudhossam/1461454 to your computer and use it in GitHub Desktop.
Save mahmoudhossam/1461454 to your computer and use it in GitHub Desktop.
A function that counts to 10 without using a loop.
def toTen(x):
if(x < 11):
print x
toTen(x + 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment