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