我正在尝试解析看起来像的字符串:
info_string = "[(1, 10, 10, 2), (2, 20, 12, 3), (3, 42, 53, 1)]"
我希望得到一个数组列表,即
info_list = [(1, 10, 10, 2), (2, 20, 12, 3), (3, 42, 53, 1)]
在python中我会做
import ast
info_list = ast.literal_eval(info_string)
Scala中是否有类似的功能?