Not sure my title is clear enough. I have the following list :
[u'394', u'132.2k', u'6.8k', u'1', u'100', u'457', u'3.5k', u'3.5k', u'184', u'507', u'57']
I want to loop over this list, delete all the K, and when deleting them multiply the element by 1000. So I guess I need to convert each string as an interger before multiplying it.
I tried various recipe but I'm kind of lost. Here is what I've done until now :
for item in stringlist:
if 'k' in item:
finallist.append(item)
however this doesn't work at all because it return me a list of k
without any numbers. I also tried to use replace
but couldn't make it work.
I know that's is really easy to convert strings into integers but that's not my main issue here...