小编Mic*_*ael的帖子

将列表中的所有字符串转换为int

在Python中,我想将列表中的所有字符串转换为整数.

所以,如果我有:

results = ['1', '2', '3']
Run Code Online (Sandbox Code Playgroud)

我该怎么做:

results = [1, 2, 3]
Run Code Online (Sandbox Code Playgroud)

python int list

542
推荐指数
6
解决办法
102万
查看次数

标签 统计

int ×1

list ×1

python ×1