14 lines
213 B
Python
14 lines
213 B
Python
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])
|