Skip to content

Instantly share code, notes, and snippets.

@GeorgeSeif
Created October 28, 2018 23:04
Show Gist options
  • Select an option

  • Save GeorgeSeif/b84c5d4115328b83dcdcd9e121ef0cd1 to your computer and use it in GitHub Desktop.

Select an option

Save GeorgeSeif/b84c5d4115328b83dcdcd9e121ef0cd1 to your computer and use it in GitHub Desktop.
# A for loop printing numbers from 1 to 10
for num in range(1, 11):
print(num)
# A while loop printing numbers from 1 to 10
num = 1
while num < 11:
print(num)
num = num + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment