Support our Blind Hand Charity by donating at 9818291723. Your contribution has the potential to bring about significant positive change for humanity.

Search This Blog

Sunday, August 13, 2023

SEARCH WORD IN A PARAGRAPH

t=0
while t!=3:
    print("""Choose the operation:
1.Search and Show
2.Change String
3.Exit""")
    t=int(input("Enter the operation number = "))
    if t==3:
        break
    elif t==1:
        k=0
        s=input("Enter characters to search = ")
        for i in n.split():
            str(i)
            if s==i[0:len(s)]:
                print(i)
                k=1
        if k==0:
            print("NO WORD FOUND")
    elif t==2:
        n=input("Enter a string = ")
    print()

OUTPUT