EDIT: This is a duplicate question, but I had trouble understanding the wiki page despite reading the accepted answer there. I just added an answer to that question, which also covers the time complexity for the average case and amortized worst case scenario.
This Python wiki says that when you pass in an argument to a list's pop method that its worst case time complexity is O(k) with k referring to the number passed in for k or the number of elements in k.
However, if say I pop the 3rd index of a list of 11 elements wouldn't everything after the 3rd element of the list have to be re-adjusted making the average time complexity O(n-k) And since you could remove the first element of a list wouldn't the worst case time complexity be O(n)?
list1 = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k']
list2 = list1
print(list1[3]) # d
list1.pop(3)
print(list1) # ['a', 'b', 'c', 'e', 'f', 'g', 'h', 'i', 'j', 'k']
print(list1[3]) # e
print(id(list1) == id(list2)) # True (They're still the same item in memory)
Is there some unique way Python implements lists under the hood that I'm not understanding? Or is the wiki wrong?