Check multiple character in a string

def letter_checker(string): input_str = string.lower() for letter in input_str: if input_str.count(letter) > 1: num = input_str.count(letter) return f'Number of letter \'{letter}\' in word \'{input_str}\' are {num}' return f'There is no multiple character in {input_str}' print(letter_checker("Dermatoglyphics")) print(letter_checker("isogram")) print(letter_checker("aba")) print(letter_checker("moOse")) print(letter_checker("isIsogram")) print(letter_checker(""))
Check multiple character in a string

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.