@@ -0,0 +1,1434 @@
+def example_1():%0A    s = 'p%C3%BDt%C4%A5%C3%B6%C3%B1%5Cfis%5Ctawesome%5Cr%5Cn'%0A    print(s)%0A%0A    remap = %7B%0A        ord('%5Ct'): ' ',%0A        ord('%5Cf'): ' ',%0A        ord('%5Cr'): None%0A    %7D%0A    a = s.translate(remap)%0A    print(a)%0A%0A%0Adef example_2():%0A    s = 'p%C3%BDt%C4%A5%C3%B6%C3%B1 is awesome%5Cn'%0A%0A    import unicodedata%0A    import sys%0A    combining_chars = dict.fromkeys(%0A        c for c in range(sys.maxunicode) %0A        if unicodedata.combining(chr(c)))%0A    b = unicodedata.normalize('NFD', s)%0A    print(b)%0A    print(b.translate(combining_chars))%0A%0A%0Adef example_3():%0A    import unicodedata%0A    import sys%0A%0A    digitmap = %7B c: ord('0') + unicodedata.digit(chr(c))%0A                 for c in range(sys.maxunicode)%0A                 if unicodedata.category(chr(c)) == 'Nd' %7D %0A    print(len(digitmap))%0A    x = '%5Cu0661%5Cu0662%5Cu0663'%0A    print(x.translate(digitmap))%0A%0A%0Adef example_4():%0A    a = 'p%C3%BDt%C4%A5%C3%B6%C3%B1 is awesome%5Cn'%0A%0A    import unicodedata%0A    b = unicodedata.normalize('NFD', a)%0A    print(b.encode('ascii', 'ignore'))%0A    print(b.encode('ascii', 'ignore').decode('ascii'))%0A%0A%0Adef example_5():%0A    def clean_spaces(s):%0A        s = s.replace('%5Cr', '')%0A        s = s.replace('%5Ct', ' ')%0A        s = s.replace('%5Cf', ' ')%0A        return s%0A%0A    print(clean_spaces(%22hello%5Ctworld%5Cr%5Cn%22))%0A%0A%0Aif __name__ == '__main__':%0A    example_1()%0A    print('-' * 75)%0A%0A    example_2()%0A    print('-' * 75)%0A%0A    example_3()%0A    print('-' * 75)%0A%0A    example_4()%0A    print('-' * 75)%0A%0A    example_5()%0A    print('-' * 75)%0A%0A

add data for recipe 2.12