No. In Python you should use repetition structures and conditional structures to control the flow of your code.
To run lines of code if a drive is true, you do the following:
minhaVariavel = 5
if minhaVariavel == 5:
print('O valor eh 5')
else:
print('O valor nao eh 5')
To repeatedly execute a chunk of code while a condition is true, you do the following:
minhaVariavel = 0
while minhaVariavel < 5:
print('O valor eh ' + str(minhaVariavel))
minhaVariavel += 1
And there are many other control structures.
The official language website has a tutorial on this, you can access here:
https://docs.python.org/3/tutorial/controlflow.html
Don’t forget to indent your code!
This example does nothing useful. If you give an example where it is useful we can show how to do in Python. This is just do nothing.
– Maniero
The idea is quite simple, let’s say that you have a choice, where the user who is running the code can choose between 1 and 2, if it is 1 goes to a certain area of the command, if it is 2 goes to another, then returns to the beginning and can make the choice again.
– Darius da costa
So put this example in the question. If you want to know one thing and ask another, you will get bad answers.
– Maniero