# Covfefe


Your are given a string. You must replace the word(s) `coverage` by `covfefe`, however, if you don't find the word `coverage` in the string, you must add `covfefe` at the end of the string with a leading space.

For the languages where the string is not immutable (such as ruby), don't modify the given string, otherwise this will break the test cases.

Difficulty: introductory

Starter code:

def covfefe(s):
	

Solutions:
def covfefe(s):
    return s.replace("coverage","covfefe") if "coverage" in s else s+" covfefe"

def covfefe(s):
    if 'coverage' in s:
        return s.replace('coverage', 'covfefe')
    else:
        return s + ' ' + 'covfefe'


def covfefe(s):
    return "".join(s.replace("coverage", "covfefe") if "coverage" in s else s + " covfefe")



def covfefe(s):
    t = s.replace("coverage", "covfefe")
    return  t + " covfefe"*(len(t) == len(s))

covfefe = lambda s: s.replace("coverage", "covfefe") if "coverage" in s else s + " covfefe"

def covfefe(s):
    return s.replace('coverage', 'covfefe') if s.__contains__('coverage') else s + ' covfefe'
        


def covfefe(s):
    return (lambda cv,cf:(s+[f' {cv}',''][cv in s]).replace(cv,cf))('coverage', "covfefe")

def covfefe(s):
    lst = list(s.split(" "))
    result = ["covfefe" if i == "coverage" else i for i in lst]
    return " ".join(result) if "coverage" in lst else " ".join(result) + " covfefe"


covfefe=lambda s,x='coverage',y='covfefe':[s+' '+y,s.replace(x,y)][x in s]

def covfefe(stg):
    return stg.replace("coverage", "covfefe") if ("coverage" in stg) else f"{stg} covfefe"