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

Train ticket booking project using Python

Grab latest technology news by just writing nine lines of code in "Python"!