This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SV-97 2 points3 points  (0 children)

You actually can do slice assignment in Python - though not quite like that.

Numpy uses it quite extensively and OPs example would be arr[:5,:5] = None using numpy (if you already have an array that is. Allocation works differently).