#!/usr/bin/env python #-*- coding: utf-8 -*- import string import unicodedata with open('poeme', 'r') as tete: poeme = tete.read() txt = poeme txt = unicodedata.normalize('NFD', unicode(txt, 'utf-8')).encode('ascii', 'ignore') txt = txt.lower() asciiChars = list(string.ascii_lowercase) x = txt.replace("le", "ce").replace("la","sa").replace(","," amen").replace("."," amen ").replace("'"," amen") print(x)