- continue loops:
- for loop:
for i in range(start,end, jump):
-
end+jump for include the end
-
defaults: start=0, jump=1 can not write it: range(end)
-
range doesn't work with float, need to be creative.
i.e: for i in range(20): .....
-
- while loop advanced:
- using while, when we don't know when you stop.
- you can add conditions to the while
- do-while loop:
i.e: https://www.freecodecamp.org/news/python-do-while-loop-example/
while TRUE: ..... if(some condition): break;
- for loop:
for i in range(start,end, jump):
-
print (x,end=" ") - changes the last char from "\n" to " " to all next print, till you break it with empty print()
-
if there is no use with the iterator at all, you can use with _ instead of i
i.e for _ in range(20): ....
-
can do condition of x==y==z