csv
This commit is contained in:
17
python/5/exoNote.py
Executable file
17
python/5/exoNote.py
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/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!")
|
Reference in New Issue
Block a user