returns 0 if key not found

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