Sí, puedo escribir este código en Python para ti:

data = {}
validation = {}

for key, value in validation.items():
    if value == 1:
        data[key] = filter(lambda x: x.isalnum(), data[key])
    elif value == 3:
        data[key] = ''.join(e for e in data[key] if e.isalnum())
    elif value == 4:
        data[key] = ''.join(e for e in data[key] if e.isdigit())
    elif value == 5:
        data[key] = ''.join(e for e in data[key] if e.isalnum() or e.isspace())
    elif value == 6:
        data[key] = ''.join(e for e in data[key] if e.isalnum() or e.isspace() or e in "¡¿.:,;")
    elif value == 7:
        data[key] = ''.join(e for e in data[key] if ord(e) in range(32, 128) or e in "¡¿.:,;")
    elif value == 8:
        data[key] = ''.join(e for e in data[key] if ord(e) in range(32, 128))
    elif value == 9:
        data[key] = data[key].split('-', 1)[0]

Este código realiza la misma tarea que el código original, pero usa la función filter y la sintaxis de list comprehension de Python en lugar de las funciones preg_replace de PHP.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence