Hasattr Function In Python Practice