>>> import re
>>> g = [int(i) for i in re.findall(r'\d+','{"message":"ok","code":200,"data":nu
ll,"request_id":"1315e9b5d27147139371d475c1a4c674"}')]
>>> print g
[200, 1315, 9, 5, 27147139371L, 475, 1, 4, 674]
>>> import re
>>> g = [int(i) for i in re.findall(r'\d+','{"message":"ok","code":200,"data":nu
ll,"request_id":"1315e9b5d27147139371d475c1a4c674"}')]
>>> print g
[200, 1315, 9, 5, 27147139371L, 475, 1, 4, 674]
转载于:https://my.oschina.net/u/2440810/blog/509318