Oct-27-2020, 07:05 AM
(Oct-26-2020, 11:10 PM)bowlofred Wrote: In your changed version, on line 5: temperature.replace() doesn't modify temperature. It returns the modified string. If you don't assign it to something (like temperature), the replacement is lost.
temperature.replace("F", "") # this is a noop because the replaced string is not captured anywhere
BINGO! Now it works.
So now I understand that I can't just add the .replace to a str and it will replace the character. I have to assign it to the variable.
Thanks a million bowlofred!!