Skip to content

Instantly share code, notes, and snippets.

@FernandoVezzali
Forked from leovolving/range.py
Created February 7, 2019 16:07
Show Gist options
  • Save FernandoVezzali/a3a1046ce36298e44da144b8005cf492 to your computer and use it in GitHub Desktop.
Save FernandoVezzali/a3a1046ce36298e44da144b8005cf492 to your computer and use it in GitHub Desktop.
# prints 0-9
for x in range(10):
print x
# prints 1-10
for x in range(1, 11):
print x
# remember, we don't need to declare variables
# we can just assign them
word = "hello"
# prints each letter in the word variable
for x in range(len(word)):
print word[x]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment