python avoid keyerror in dict

visit shbcf.ru