title: How to replace values of a certain location in a string in Python
body: <p>Suppose I have the string x='abcd'. I want to replace the first and last letters of the string with c so that it becomes x='cbcc'. I'm a beginner at programming so I do not know how to do this.</p>