Grab repeated Strings from any given sentences

 










Code:For extracting repeated string occurrences

def Occurrences(string):
    word="Microsoft"
    letters={words for words in string if words in word.lower()} 
    print(f"{''.join(letters).upper()}\n Repeated letters: {len(letters)}")
Occurrences(input("Enter the letters "))









Comments

Popular posts from this blog

Automate your file manager using Python

Train ticket booking project using Python