背景
主要用来记录一些非模块、python本身自带函数的使用
eval()函数的使用
eval()函数用于执行一个字符串表达式,并返回表达式的值。
参考链接:https://www.runoob.com/python/python-func-eval.html
使用eval()函数之后,再执行就不会抛出异常,而是被正常转换为字典。
读取文件时,用for循环输出时会有一个空行。
参考链接:https://www.cnblogs.com/geeksongs/archive/2020/03/30/12598906.html
在print中加入end=""
后,输出的内容中不再包含空行。