In this program, we will take a string as input and add ly at the end if the string ends with ing.
- Take a string as input.
- Check whether the string ends with ‘ing‘.
- If yes, then add ‘ly‘ at the end.
- Print the output.
#Input string
str1 = "winning"
#Printing output
if str1[-3:] == "ing":
print(str1+"ly")
Output :
winningly