Last active
May 14, 2019 05:02
-
-
Save dichharai/af336f8fc3636b7d3368cc86af9793e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# continuation of settattr-eg.py example | |
# output: reese's contains nuts? : False | |
print('reese\'s contains nuts? : ' + str(getattr(reese, reese.list_of_choco_ingrie['IS_NUTTY'], False))) | |
# output: godvia contains nuts? : True | |
print('godvia contains nuts? : ' + str(getattr(godiva, godiva.list_of_choco_ingrie['IS_NUTTY'], False))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment