Get attribute by string name
name = 'asdf'; foo.name isn’t the same as foo.asdf. You need getattr.
name = 'asdf'; foo.name
foo.asdf
getattr