Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def nbOccu(lettre,texte):
- nbLettres=0
- for i in texte:
- if lettre==i:
- nbLettres+=1
- print(nbLettres)
- def major(texte):
- lettre=''
- major=0
- for i in texte:
- compte=0
- for j in texte:
- if j==i:
- compte+=1
- if compte>major:
- major=compte
- lettre=i
- if compte==major:
- lettre1=i
- if lettre==lettre1:
- return(lettre)
- else:
- return(lettre,lettre1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement