def remove_prefix ( text , prefix ) : null , prefix , rest = text . rpartition ( prefix ) return rest
substring or prefix in python
Remove the prefix from the text if it exists .
def remove_prefix(text, prefix):
	"""
	Remove the prefix from the text if it exists.

	>>> remove_prefix('underwhelming performance', 'underwhelming ')
	'performance'

	>>> remove_prefix('something special', 'sample')
	'something special'
	"""
	null, prefix, rest = text.rpartition(prefix)
	return rest