Python用pygal库render命令报错 in _init_ u(‘xml’),u(‘xml’), u(“version=‘1.0’ encoding=‘utf-8’”))]
《Python编程:从入门到实践》15.4.6 绘制直方图
源码
import pygal
from die import Die
die = Die()# roll the die, the save the results in a list
results =[]for roll_num inrange(1,1000):
results.append(die.roll(
Python用pygal库render命令报错 in _init_ u(‘xml’),u(‘xml’), u(“version=‘1.0’ encoding=‘utf-8’”))]《Python编程:从入门到实践》15.4.6 绘制直方图源码import pygalfrom die import Diedie = Die()# roll the die, the save the results in a listresults = []for roll_num in range(1, 1