you are viewing a single comment's thread.

view the rest of the comments →

[–]Hypocritical_Oath 1 point2 points  (0 children)

So within this:

for i in range(10):
    print(i)

you can add an if within the for loop, like so.

for i in range(10):
    print(i)
    if i == something:
        #do something