import re


def remove_not_alpha_num(string):
    return re.sub('[^0-9a-zA-Z]+', '', string)


if __name__ == '__main__':
    print(remove_not_alpha_num('a000 aa-b') == 'a000aab')

[((5, 11, 5, 46), 're.sub', 're.sub', ({(5, 18, 5, 33): '"""[^0-9a-zA-Z]+"""', (5, 35, 5, 37): '""""""', (5, 39, 5, 45): 'string'}, {}), "('[^0-9a-zA-Z]+', '', string)", False, 'import re\n')]