
python学习
wm6274
这个作者很懒,什么都没留下…
展开
-
python 列表间的赋值说明
当你新建一个列表如:ls = [‘a’, ‘b’, ‘c’] 令 ls2 = ls 则这里其实是相当于引用,ls2就是ls的别名,ls2, ls都指向同一数据空间 对ls2修改其值,则ls里的值也会随之改变。原创 2017-05-26 11:51:07 · 769 阅读 · 0 评论 -
ubuntu系统服务器下调用python中matplotlib问题
我们一般登录服务器是使用: ssh name@192.xxx.xxx.xx 这种情况登入服务器后,在python中使用如下代码:import matplotlib.pyplot as plt x = [1, 2, 3, 4] y = [2, 3, 3, 4] plt.plot(x, y)会出现如下错误:QXcbConnection: Could not connect to di原创 2017-07-03 15:33:15 · 1980 阅读 · 0 评论