📌  相关文章
📜  将字符串列表转换为熊猫列表 - Python 代码示例

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

代码示例1
import ast 

# initializing string representation of a list 
ini_list = "[1, 2, 3, 4, 5]"
  
# Converting string to list 
res = ast.literal_eval(ini_list) 
  
# printing final result and its type 
print ("final list", res) 
print (type(res))