提问前,请看我的个人简介
pydict={"name":"py3","list":[2,3,4],"none":None}pydict# pydict['func']# num = 3 + pydict['name']try:func=pydict['func']exceptKeyError:print("pydict['func'] is not given yet")try:num=3+pydict['name']exceptTypeError:print("num+str is the problem")try:num=3+pydict['name']exceptExceptionase:print("num+str is the problem")print(e)pydict['attr']=100pydict