このコードをPythonに書き込みます
```
for key, value in validation.items()：
    if validation[key] == 1：
        data[key] = re.sub(r'[^', '', FILTER_SANITIZE_EMAIL)
    elif validation[key] == 3：
        data[key] = re.sub(r'[^worsk@.]', '', data[key])
        GeneralSanitisation = False
    elif validation[key] == 4：
        data[key] = re.sub(r'[^0-9]', '', data[key])
        一般化 = False
    elif validation[key] == 5：
        data[key] = re.sub(r'[^w]', '', data[key])
        GeneralSanitization = False
    elif validation[key] == 6：
        data[key] = re.sub(r'[^[^wésks[:punct:]punct:]¡¿]]', '', data[key])
    elif validation[key] == 7：
        data[key] = re.sub(r'[^[^wés[:punct:]punct:]¡x20-x7F]]', '', data[key])
    elif validation[key] == 8：
        data[key] = re.sub(r'[^x20-xxx7F]', '', data[key])
    elif validation[key] == 9：
        data[key] = re.sub(r'^([a-zA-Z0-9_-]+)([^a-zA-Z0-9_-]+).*$', r'\1', data[key])
```

    もしGeneralSanitization：
```
        data[key] = re.sub(r'[^a-zA-Z0-9_-]+', '', data[key])
```