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