2 lines
107 B
Python
2 lines
107 B
Python
def remove_suffix(string, suffix):
|
|
return string[:-len(suffix)] if string.endswith(suffix) else string
|