如果我在python中有一个列表,我如何创建对列表的一部分的引用?例如:
myList = ["*", "*", "*", "*", "*", "*", "*", "*", "*"]
listPart = myList[0:7:3] #This makes a new list, which is not what I want
myList[0] = "1"
listPart[0]
"1"
Run Code Online (Sandbox Code Playgroud)
这是可能的,如果是这样,我将如何编码?
干杯,乔