I'm learning python and am studying from the book Dive into the Python. It says :
The built−in
range
function returns a list of integers. In its simplest form, it takes an upper limit and returns a zero−based list counting up to but not including the upper limit.
According to what it says, it returns a list. I thought that I could append a value to it with append function, but I couldn't.
>>> l = range(7)
>>> l
[0, 1, 2, 3, 4, 5, 6]
>>> l.append(13)
>>> l
[0, 1, 2, 3, 4, 5, 6, 13]
>>> l = range(7).append(13)
>>> l
It doesn't print anything, what's the reason?