2021年3月3日星期三

How to change the index of a list in python. I am getting rid of the first value, but the index still stays the same

EG.

list1 = [1, 2, 3, 4]

list1[0] = None

#how do I get the list to now start at 2 (make the index of 2 = list1[0]) because when I call list1[0] after doing this I get a blank output.

https://stackoverflow.com/questions/66468419/how-to-change-the-index-of-a-list-in-python-i-am-getting-rid-of-the-first-value March 04, 2021 at 12:04PM

没有评论:

发表评论