In the code below how match the pattern after "answer" and "nonanswer" in the dictionary
opt_dict=(
{'answer1':1,
'answer14':1,
'answer13':12,
'answer11':6,
'answer5':5,
'nonanswer12':1,
'nonanswer11':1,
'nonanswer4':1,
'nonanswer5':1,})
And
if opt_dict:
for ii in opt_dict:
logging.debug(ii)
logging.debug(opt_dict[ii])
if ii in "nonanswer":
logging.debug(opt_dict[ii])
elif ii in "answer":
logging.debug("answer founddddddddddddddddddddddddddddddd")
logging.debug(opt_dict[ii])
else:
logging.debug("empty dict")