Oct-20-2017, 01:14 AM
I don't know what you're TA is talking about. The replace method replaces. They called the replace method replace because it replaces. Replacing is what the replace method does, so they called it replace. Why would you call the replace method replace if it didn't replace? If the replace method didn't replace, it wouldn't be called replace.
Sorry, Mojo Jojo attack.
Anyway, the only issue I can think of with the replace method that replaces is that it doesn't replace in place. It returns a new string with the replacement replaced, so you need to assign it to something:
Sorry, Mojo Jojo attack.
Anyway, the only issue I can think of with the replace method that replaces is that it doesn't replace in place. It returns a new string with the replacement replaced, so you need to assign it to something:
x.replace('tga', '') # x does not change x = x.replace('tga', '') # x is replaced with a string where the replacement is done.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures