How assignment works with Python list slice?

前端 未结 4 1197
灰色年华
灰色年华 2020-11-21 23:19

Python doc says that slicing a list returns a new list.
Now if a "new" list is being returned I\'ve the following questions related to "Assignment to sl

4条回答
  •  误落风尘
    2020-11-21 23:36

    By slicing on the left hand side of an assignment operation, you are specifying which items to assign to.

提交回复
热议问题