#!/usr/bin/python3 chaine= str (input('saisir une chaine : ')) tab = choisir.split(' ') cptmot={} for mot in tab: if mot in cptmot: cptmot[mot]+=1 else: cptmot[mot]=1 for mot in cptmot.keys(): print("mot:",mot,":"cptmot[mot])