【发布时间】:2011-10-29 03:36:44
【问题描述】:
我需要将字符串列表更改为整数列表我该怎么做
即
('1', '1', '1', '1', '2') 转化为 (1,1,1,1,2)。
【问题讨论】:
-
How to convert strings into integers in python? 的可能副本。 This one 也类似。更不用说these ones。在您提出新问题之前,请使用搜索。
-
挑剔:那些是元组,而不是列表。
-
@Wooble:现在我的回答中涵盖了。我想从一开始就写它,但是在回答这些简单的问题时你必须要快;)