Skip to content

Instantly share code, notes, and snippets.

@saaeiddev
Created September 26, 2022 18:24
Show Gist options
  • Save saaeiddev/78342c9c8a012898ccdfb1b23fd8820e to your computer and use it in GitHub Desktop.
Save saaeiddev/78342c9c8a012898ccdfb1b23fd8820e to your computer and use it in GitHub Desktop.
range
for i in range(5 , 25):
if i > 10 and i < 15:
print(i , i * 2)
print("done")
elif i > 19 and i < 21:
print(i , i + 2)
print("this")
else:
print("try again !")
List3 = [2 , 3 , 6]
for x in range(11 , 23):
if x > 17:
print(x , x + 1)
else:
List3.append(x)
print(List3)
List4 = ["hi" , 3 , 9]
for y in range(20 , 38):
if y / 2 == 0:
List4.append(y)
print(List4)
else:
print(y , y - 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment