相关疑难解决方法(0)

在python中将数组的字符串表示形式转换为实际数组

嗨,通过网络做一些事情,并想知道是否有任何方式将python数组转换为字符串回到python数组..例如

x = "[1,2,3,4]"
Run Code Online (Sandbox Code Playgroud)

将x转换为

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

奖金,如果它也可以适用于多块的多维数组!

python arrays numpy type-conversion

1
推荐指数
1
解决办法
1189
查看次数

标签 统计

arrays ×1

numpy ×1

python ×1

type-conversion ×1