Answer the question
In order to leave comments, you need to log in
How to repeat the cycle?
And so, look, I didn’t ask a lot of the wrong question.
There is a code
a = 0
def new():
for line in range(2):
print(a)
a += 1
new()
Answer the question
In order to leave comments, you need to log in
Yes, it is possible in different ways.
You can set a global variable.
a = 0
def new():
global a
for line in range(2):
print(a)
a +=1
new()
0
1
a = 0
def new(a):
for line in range(2):
print(a)
a +=1
new(a)
0
1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question