fork download
  1. import re
  2. import ast
  3.  
  4. tempprices = "0.0, 82.00.0,...., 82.0, 55.55 66.6666 777.777\n"
  5. cells = tempprices.split(',')
  6. temp =[]
  7. for t in cells:
  8. temp.extend(map(ast.literal_eval,re.findall(r'-?\d+\.\d{1,2}', t)))
  9. print(temp)
  10.  
Success #stdin #stdout 0.01s 9120KB
stdin
Standard input is empty
stdout
[0.0, 82.0, 82.0, 55.55, 66.66, 777.77]