strings.frequency_finder

Attributes

ETAOIN

LETTERS

english_letter_freq

Functions

english_freq_match_score(→ int)

get_frequency_order(→ str)

Get the frequency order of the letters in the given string

get_item_at_index_zero(→ str)

Take a tuple x as a parameter and return a string.

get_letter_count(→ dict[str, int])

get_letter_count() takes message as a parameter, which should be a string.

Module Contents

strings.frequency_finder.english_freq_match_score(message: str) int
>>> english_freq_match_score('Hello World')
1
strings.frequency_finder.get_frequency_order(message: str) str

Get the frequency order of the letters in the given string >>> get_frequency_order(‘Hello World’) ‘LOWDRHEZQXJKVBPYGFMUCSNIAT’ >>> get_frequency_order(‘Hello@’) ‘LHOEZQXJKVBPYGFWMUCDRSNIAT’ >>> get_frequency_order(‘h’) ‘HZQXJKVBPYGFWMUCLDRSNIOATE’

strings.frequency_finder.get_item_at_index_zero(x: tuple) str

Take a tuple x as a parameter and return a string.

strings.frequency_finder.get_letter_count(message: str) dict[str, int]

get_letter_count() takes message as a parameter, which should be a string. It returns a dictionary where the string is a key and an integer is a value.

strings.frequency_finder.ETAOIN = 'ETAOINSHRDLCUMWFGYPBVKJXQZ'
strings.frequency_finder.LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
strings.frequency_finder.english_letter_freq