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