📜  python3 从字符串创建列表 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:05.356000             🧑  作者: Mango

代码示例1
input = ['word1, 23, 12','word2, 10, 19','word3, 11, 15']
output = []
for item in input:
    items = item.split(',')
    output.append([items[0], int(items[1]), int(items[2])])