Skip to content

Instantly share code, notes, and snippets.

@Lysander
Created May 9, 2014 09:35
Show Gist options
  • Select an option

  • Save Lysander/b48478d6cf539ac285a3 to your computer and use it in GitHub Desktop.

Select an option

Save Lysander/b48478d6cf539ac285a3 to your computer and use it in GitHub Desktop.
'D1353 M17731LUNG D13N7 4L5 B3W315, ...'
def transform_to_brain_test_style(text):
replacements = {'I': '1', 'E': '3', 'A': '4', 'S': '5', 'T': '7'}
for char in text.upper():
yield replacements.get(char, char)
"".join(transform_to_brain_test_style("Diese Mitteilung dient als Beweis, ..."))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment