def suffix_replace(original, old, new):
 return (original[:(- len(old))] + new)

def suffix_replace ( original , old , new ) : return ( original [ : ( - len ( old ) ) ] + new )
replaces the old suffix of the original string by a new suffix .