Apr-20-2018, 06:54 PM
(Apr-19-2018, 09:18 PM)Gribouillis Wrote:(Apr-19-2018, 09:13 PM)mattraffel Wrote: Can you give me an exampleclass Foo: pass foo = Foo() foo.fees = ['GMBk8YVHn2', 2, 'C4xbW4SR'] print(getattr(foo, 'fees'))
Thank you.
I also found a slightly different way. It produces the same results. I thought I would post it in case it helps someone else.
class Foo: pass foo = Foo() setattr(foo, "fees", ['GMBk8YVHn2', 2, 'C4xbW4SR']) print(getattr(foo, 'fees'))