How to avoid AttributeError and get an undefined value in Python

Published --