I have this:
>>> a = [1, 2, 4]
>>> print a
[1, 2, 4]
>>> print a.insert(2, 3)
None
>>> print a
[1, 2, 3, 4]
>>> b = a.insert(3, 6)
>>> print b
None
>>> print a
[1, 2, 3, 6, 4]
Is there a way I can get the updated list as the result, instead of updating the original list in place?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…