range = 10
i=1 while i < range: print(i) i = 1
Is there any way use 'continue statement' and make it happen?
CodePudding user response:
Simplest method is this:
rng= 11
i = 1
while i < rng:
print(i)
i =1
if i ==3:
i =1
so when i = 3, it skips that i - I don't think you would need anything more complex than this
output is: 1 2 4 5 6 7 8 9 10
CodePudding user response:
while i < 10 :
if i != 3 :
print(i)
i =1