delete item from dictionary if key equals value code example
Example: python dictionary delete by value
myDict = {key:val for key, val in myDict.items() if val != deletevalue}
myDict = {key:val for key, val in myDict.items() if val != deletevalue}