Answers for "add ing to the end of a string or add ly if the string ends with ing python"

0

add ing to the end of a string or add ly if the string ends with ing python

def add_suffix(input_string):
	if len(input_string) < 3: return input_string
    if input_string.endsWith("ing"): return input_string + "ly"
    else: return input_string + "ing"
Posted by: Guest on May-07-2022

Python Answers by Framework

Browse Popular Code Answers by Language