¿Podemos usar para bucle adentro si la declaración?

# Q: CAN WE USE A FOR LOOP INSIDE AN IF STATEMENT
# A: YES, YOU CAN PUT A FOR LOOP INSIDE AN IF STATEMENT. LIKE THIS:

myVar = 5
if myVar == 5:
  for i in range(myVar): # Prints out 01234 on separate lines
    print(i)
    
# You could also put an if statement in a for loop:
myNumber = 10
for i in range(myNumber):
  if i == 4:
    print("i is equal to 4")
Ninja Penguin