I'm struggling to make sense of the following for a python list:
L = []
L[0:] = 'string' # equivalently L[:] = 'string'
and here L = ['s','t','r','i', 'n', 'g']
why does python do this? I know this is the expected behaviour of running
list('string')
but I'm not sure how to explain this behaviour.