Hi guys,
I have a problem. I have a list which contains strings and numeric.
What I want is to compare them in loop, ignore string and create
another list of numeric values.
I tried int() and decimal() but without success.
eq of problem is
#hs=string.spli t(hs)
hs =["popopopopop"," 254.25","pojdjd kjdhhjdccc","25 452.25"]
j=0
for o in range(len(hs)):
print hs[o],o
p=Decimal(hs[o])
if p 200: j+=j
print "-"*5,j
print "*"*25
I could be the best way to solve this ......?
@nil
I have a problem. I have a list which contains strings and numeric.
What I want is to compare them in loop, ignore string and create
another list of numeric values.
I tried int() and decimal() but without success.
eq of problem is
#hs=string.spli t(hs)
hs =["popopopopop"," 254.25","pojdjd kjdhhjdccc","25 452.25"]
j=0
for o in range(len(hs)):
print hs[o],o
p=Decimal(hs[o])
if p 200: j+=j
print "-"*5,j
print "*"*25
I could be the best way to solve this ......?
@nil
Comment