Updating a sliced list

后端 未结 4 1520
野性不改
野性不改 2021-02-19 04:12

I thought I understood Python slicing operations, but when I tried to update a sliced list, I got confused:

>>> foo = [1, 2, 3, 4]
>>> foo[:1]          


        
4条回答
提交回复
热议问题