Python Remove Key From Dictionary If Exists Mysql