[Solved] how to parse this string in Python? [duplicate]


You can use regular expressions from re module:

import re
s = "('-1259656819525938837', 598679497)\t0.036787946"
re.findall(r'[-+]?[0-9]*\.?[0-9]+', s)
% gives: ['-1259656819525938837', '598679497', '0.036787946']

solved how to parse this string in Python? [duplicate]