python remove some strings from string code example Example: remove a part of a string python url = 'abcdc.com' print(url.replace('.com',''))