def func(x, y, z=[]) 函数定义时,可以定义空列表空字典标签:函数,range,func,字典,def,定义 From: https://www.cnblogs.com/leeyong49/p/16664640.html
def func(x = []):
for i in range(1, 300):
x.append([i])
print(x)
# 以上函数等同于
# x = [[i,] for i in range(1,100)]
# x = [i for i in range(1,100)] 与上面的输出结果是不同的。