Just like
字符串是
> "((1 0)(0 1))"
required
>((1 0)(0 1))
我也在使用 intern 函数,但它以 ((1\0)(0\1)) 的形式返回
最佳答案
您可以使用read-from-string
:
(read-from-string "((1 0)(0 1))")
这个函数有很多参数,返回两个值:第一个是你需要的,列表:
CL-USER> (car (read-from-string "((1 0)(0 1))"))
(1 0)
您可以在 official documentation 中阅读有关此功能的信息.
关于lisp - 如何在 Common Lisp 中将字符串转换为列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44149407/