Open HELL-TO-HEAVEN opened 5 years ago
x = range(max(h_count_dict.keys())+1)
y = [0 for _ in x]
y[h] = h_count_dict[h]
x = range(max(h_count_dict.keys())+1)
会报错,因为range里面只能是整数;y = [0 for _ in x]
让y初始化为一个列表,51行y[h] = h_count_dict[h]
赋值操作,因为h是小数,所以y[h]写法是错误的,会报错;