运行居然报错了… 提示plt.xlabel(‘产品名称’)这一行有错误 报错信息 ‘str’object is not callable plt.xlabel(‘产品名称’)报错‘str’object is not callable的解决方法 重新运行x轴 描述信息终于出来了。 以防下次忘记,还是记录下来了。
python : 不使用列表生成式,生成元素为100以内所有能被3整除的数,代码如下: m=[] for i in range(3,100): if (i%3==0): m.append(i) print(m) 使用列表生成式生成列表,其元素为100以内所有能被3整除的数,代码: n=[i for i in range(3,100) if(i%3==0)] …