#!/usr/bin/env python3 nomFic = input("Entrer un nom de fichier : ") f = open(nomFic, "r") lignes = f.readlines() c = 0 for ligne in lignes: for i in range(len(ligne)): if ligne[i] == 'a': c = c + 1 f.close() print("il y a ", c, " 'a' dans le ficher!")