What\'s the difference between
list = range(100)
and
list[:] = range(100)
in Python?
EDI
list[:] will only work if there is already an object named list that allows slice assignment.
list[:]
list
Also, you shouldn't name variables list because there is a built-in named list which is the list type itself.