I have a list that looks like this:
stuff = ['\n', '<td><nobr>8h</nobr></td>', '\n', '<td><nobr>2021-04-02 14:27:44.729</nobr></td>', '\n', '<td class="text-right">1.73</td>;', '\n']
I am trying to clean it up so that it looks like this:
stuff = ["8h","2021-04-02 13:27:44.729","1.73"]
What I am trying to do is this:
for x in range(0,len(stuff),1):
stuff[x] = stuff[x].replace("\n","")
stuff[x] = stuff[x].replace("<td>","")
I am hoping to remove the characters if they are there. If not, I'm hoping that part will just be skipped.
The error message I am getting is
NoneType Object is not callable.
Any suggestions?
Edit #1:
I believe this has something to do with the \n
values messing things up. I'm not sure if this is accurate, but that's my feeling.