Use the map
function (in Python 2.x):
(使用map
函数(在Python 2.x中):)
results = map(int, results)
In Python 3, you will need to convert the result from map
to a list:
(在Python 3中,您需要将结果从map
转换为列表:)
results = list(map(int, results))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…