>>> 'MiscTests'.removesuffix('Tests') 'Misc' >>> 'TmpDirMixin'.removesuffix('Tests') 'TmpDirMixin'
# remove prefix and suffix 're-tweet'.lstrip('re-') # tweet 're-tweet'.rstrip('-tweet') # re