
Studiuj dzięki licznym zasobom udostępnionym na Docsity
Zdobywaj punkty, pomagając innym studentom lub wykup je w ramach planu Premium
Ta strona nie jest widoczna w podglądzie
Nie przegap ważnych części!

string = "ABC for the purpose of LetterCounting program" print(string) words = 1 letters 0 hash_table = {} for char in string: char = char.lower() if char == ' ': words+= else: letters+= if char in hash_table: hash_table[char]+= else: hash_table[char]= print("Words:", words, "Letters:", letters, "Freq:", hash_table)