Skip to content

Instantly share code, notes, and snippets.

@leovolving
Created September 3, 2017 18:36
Show Gist options
  • Save leovolving/0a6efdfe9bc277aeac50867c1fc6e3c6 to your computer and use it in GitHub Desktop.
Save leovolving/0a6efdfe9bc277aeac50867c1fc6e3c6 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