0
class Test():
    def __init__(self, request):
        self.attr = request*3
obj = Test(3)
obj_str = 'obj'
print(obj_str.attr)

Above is an example code. I would like to get obj.attr using the str of obj. Thank you!

0 Answers0