2👍
✅
That’s because it tries to fetch property 'y.random'
, though there is no such property, and it’s not even valid to have a property with .
.
getattr(getattr(x, 'y'), 'random'))
Source:stackexchange.com