May-14-2019, 04:52 PM
hello, my program include a dict, but when I try to call a object of the dict, that result with a KeyEror
actualsearch=0
dict={ 0: 41, 1: 41, 2: 41, }
if dict[int(actualsearch)]==41: #I try int and str, but both dosen't work
do something
actualsearch=actualsearch+1I want to call the dict object whit the var actualsearch, but they call this errorError:if dict[int(actualsearch)]==41:
KeyError: '0'if you can help my, I will be thankful
