I've tried:
import a
from a import b
for i in range(1,10):
c = position(i,2,3)
maybe = getattr(b, str(c))
position = geo[maybe]
After running this, I get the error in the title. But when I just write:
import a
from a import b
position = geo[b.position(1,2,3)]
I don't get an error. I've also tried using a function, but I get the same error:
def some_function(obj):
for attribute in [c]:
getattr(obj, str(attribute))
position = geo[some_function(b)]
How can I fix this so that I can use this variable as an attribute?