Answer the question
In order to leave comments, you need to log in
Storing a variable in a for loop and using it outside?
Here is a piece of code, everything works except for the output of x and y
for (x,y,w,h) in heads1:
x = w / 2 + x + sw
y = h / 2 + y + sh
print(x,y)
for (x,y,w,h) in heads1:
x = w / 2 + x + sw
y = h / 2 + y + sh
print(x,y)
Answer the question
In order to leave comments, you need to log in
x = y = None
for (x,y,w,h) in heads1:
x = w / 2 + x + sw
y = h / 2 + y + sh
print(x,y)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question