Jun-11-2017, 03:03 PM
what you are looking for is loop
there are different code constructs, but based on your example, one very simple solution would be for-loop:
in other cases you can use while-loop
there are different code constructs, but based on your example, one very simple solution would be for-loop:
for i in range(10): print('something') # the body of the loop can be anything you wantthis is simple loop, and the body will be executed 10 times. if you need you can use the control variable
i
in the body of the loop.in other cases you can use while-loop