...and I forgot to mention that the output of grep and diff is far more
understandable in the absence of block comments!
--
http://mail.python.org/mailman/listinfo/python-list
It's clear that if you have a modern editor, block comments are
unnecessary because it is trivial to add a # to the start of each line
of a block, but that doesn't really answer your question. It explains
why you might not always need block comments but doesn't explain why
you shouldn't use them (
It makes sense because a slice IS a list, so you should assign a list
to it. Yours is just a special case in which the target slice has a
length of zero. It's still a list, just an empty one:
>>> L = [1,2,4]
>>> print L[2:2]
[]
As for your question, yes:
>>> L = [1,2,4]
>>> L[2:2] = [[3]]
>>>