Solution lettre double

# -*- coding: utf-8 -*-
"""
Created on Mon Apr  8 09:20:32 2019

@author: vmahout
"""

import TPTexte


texte = TPTexte.Lire("La maman des poissons.txt")
print(texte)

# RECHERCHE DE DOUBLONS DE LETTRES

old = ''
nombre = 0
for car in texte:
    if (car == old and TPTexte.EstLettre(car)) :
        nombre = nombre+1
        print("J'en ai un avec ",car,"et ", old)
    old = car
    
print("Au final j'ai trouvé ",nombre," doublons")