I have a dictionary containing user name and age. I can use the name attribute to get name. But if it does not exist then python shows me the error.
I want to write
try except in my programme so that it does not break. How can i write that and get that error message that name does not exists.