That indeed seems to be the approach taken for the replace method except you do not assign it to the variable because in Python, strings are immutable.
Here is what you could change your code to:
name = "abc000" # Put your string in quotes name = name.replace("000", "") print(name) # Now this will print 'abc'
Explanation:
String Quotations:
Now enclose your string inside quotes - either single, ".'s, or double ".
Assign the Output:
Now the replace method outputs its new string so make sure to assign the output back to name, or the variable you choose above.
Print the Output:
Now when you prompt the user for a name you should now get in return the new string of: This should execute in your Python interpreter and, therefore, within of PyCharm.