I am new to python and need help in solving an issue:
I have a dictionary like
tmpDict = {'ONE':{'TWO':{'THREE':10}}}
Do we have any other way to access THREE’s value other than doing
tmpDict['ONE']['TWO']['THREE']
?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the get() on each dict. Make sure that you have added the None check for each access.