I recently started learning python 3.
In python 2 the range()
function can be used to assign list elements:
>>> A = []
>>> A = range(0,6)
>>> print A
[0, 1, 2, 3, 4, 5]
But in python 3 the range()
function outputs this:
>>> A = []
>>> A = range(0,6)
>>> print(A)
range(0, 6)
Why is this happening?
Why did python do this change?
Is it a boon or a bane?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…