Python Saved Program: kind-home

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


str=["apple","orange","banana","pineapple","goa"]
str1[]
for i in str:
    str1.append((len(i),i))
    str1.sort()
print(str1[4])    
str2=input("Enter the string:")
snot=str2.find('not')
sp=str2.find('poor')
if sp>snot:
    str2=str2.replace(str2[snot:(sp+4)],'good')
    print(str2)
str3=input("Enter the string:")
l=len(str3)
if l>2:
    if str3[-3:]=='ing':
        str3+='ly'
    else:
        str3+='ing'
print(str3)        
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs