2020-05-29

2020-05-29  本文已影响0人  价值投机168

1.异常的基本写法:


image.png

2.try...except....else规则:


image.png

3.使用json存储数据:
import json

nums = [1,2,3,6,89]
dc={'a':123,'dd':'hellodic'}
filename = 'test.json'
with open(filename,'w') as fo:
#json.dump(nums,fo)
json.dump(dc,fo)

with open(filename) as fo:
ts = json.load(fo)

print(ts)

4.安装matplotlib:
https://blog.csdn.net/qq_41720475/article/details/81978694

5.matplotlib画图实例:


image.png
上一篇下一篇

猜你喜欢

热点阅读