摘要: 一、eval内置函数eval内置函数的使用场景: 1、执行字符串会得到相应的执行结果 2、一般用于类型转换,得到dict、list、tuple例: dic_str = ''{'a':1,'b':2}'' print(eval(dic_str)) # {'a':1,'b':2} with open(t 阅读全文
posted @ 2019-04-26 21:54 ymg-颜 阅读(116) 评论(0) 推荐(0) 编辑