Oct-27-2019, 07:11 PM
In addition to newbieAuggie2019 thorough answer - print() is cheap way to understand what is going on:
In [1]: lst = [1, 2, 3] ...: for v in range(len(lst)): ...: print(lst) # lst before insert ...: lst.insert(1, lst[v]) ...: print(lst) # lst after insert ...: [1, 2, 3] [1, 1, 2, 3] [1, 1, 2, 3] [1, 1, 1, 2, 3] [1, 1, 1, 2, 3] [1, 1, 1, 1, 2, 3]
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.