Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. import string
  2.  
  3. def checkio(text):
  4.     """
  5.    We iterate through latyn alphabet and count each letter in the text.
  6.    Then 'max' selects the most frequent letter.
  7.    For the case when we have several equal letter,
  8.    'max' selects the first from they.
  9.    """
  10.     text = text.lower()
  11.     return max(string.ascii_lowercase, key=text.count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement