I want to change ,multiple values in a list, for example, every multiple of 2. Using slicing. my logic is:
list = [0] * 10
list[::2] = 1
However, I get an error message: " must assign iterable to extended slice" Can someone explain the error and also the correct logic to preform something like this? Thanks.