Replace part of a string in Python? March 5, 2023 by Tarik >>> stuff = "Big and small" >>> stuff.replace(" and ","https://stackoverflow.com/") 'Big/small'