ajout code .py

This commit is contained in:
Mathis Laceppe
2022-09-28 17:44:51 +02:00
parent df57eff86d
commit 02fa25a9f4
5 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
txt=str(input('écrivez :'))
tabmot=txt.split(" ")
cptmot= {}
for mot in tabmot:
if not mot in cptmot:
cptmot[mot]=1
else:
cptmot[mot]=cptmot[mot]+1
for mot in cptmot.keys():
print (mot,":",cptmot[mot])