def cmd_reverse_lookup(command_name):
 for (key, value) in miss_cmds.items():
  if (value.upper() == command_name.upper()):
   return key
 return 0

def cmd_reverse_lookup ( command_name ) : for ( key , value ) in miss_cmds . items ( ) : if ( value . upper ( ) == command_name . upper ( ) ) : return key return 0
returns 0 if key not found .