0

I hope you guys can see what I am trying to do, I'm just looking to see if there is any syntax missing or if this just is not possible on Python

obj = MyClass()
obj.i = '1'
obj.ii = '2'
obj.iii = '3'

for a in range(1,3):
    print(obj.('i'*a))

getting error was hopping for:

1 2 3

Kodow
  • 1

0 Answers0