C
C GIllespie
Dear all,
I have a list something like this: ['1','+','2'], I went to go through and
change the numbers to floats, e.g. [1,'+',2]. What's the best way of doing
this? The way I done it seems wrong, e.g.
nod=['1','+','2']
i=0
while i<len(nod):
if nod !='+' or nod !='-' or nod!='*' or nod != '/' or
nod != '(' or nod != ')':
nod = float(nod)
i = i + 1
Comments?
Thanks
Colin
I have a list something like this: ['1','+','2'], I went to go through and
change the numbers to floats, e.g. [1,'+',2]. What's the best way of doing
this? The way I done it seems wrong, e.g.
nod=['1','+','2']
i=0
while i<len(nod):
if nod !='+' or nod !='-' or nod!='*' or nod != '/' or
nod != '(' or nod != ')':
nod = float(nod)
i = i + 1
Comments?
Thanks
Colin