def toggleHashtable(hashtable, key, value):
 if (key in hashtable):
  del hashtable[key]
 else:
  hashtable[key] = value

def toggleHashtable ( hashtable , key , value ) : if ( key in hashtable ) : del hashtable [ key ] else : hashtable [ key ] = value
toggle a hashtable between having and not having a key .