1

I want to make variables inside a for loop like this :

for i in range(1,4):
        qi = i

the answer I want is that :

q1 = 1
q2 = 2
q3 = 1

How can I do that in python ? thanks

Hamid
  • 679
  • 1
  • 7
  • 22

1 Answers1

0

It would be much easier to just use a list:

q = range(1, 4)
Mureinik
  • 297,002
  • 52
  • 306
  • 350