这个问题在python3.7的文档里有做解释:ast.literal_eval() is now stricter. Addition and subtraction of arbitrary numbers are no longer allowed. (Contributed by Serhiy Storchaka in bpo-31778.),详细链接:https://docs.python.org/3/whatsnew/3.7.html
python字符串类型转换eval()和ast.literal_eval()在Python中,如果要将字符串类型的列表、元祖、字典等转换成对应的类型,可以使用两个方法,eval()和ast.literal_eval(),例如: 那么这两者之间有没有什...