Jul-07-2021, 08:02 AM
(Jul-07-2021, 12:19 AM)Skaperen Wrote: are you assuming that i need to do an additional action after the last? i need to change the 2nd argument on the last one (even if it is the only one).
As no code provided then it is hard to do anything else but assume. The idea was just very simple beginner level approach:
>>> list_ = [] >>> for i in range(4): ... list_.append(i**2) # do something with every item ... else: # no-break ... list_[-1] = i # redo last one with something else ... >>> list_ [0, 1, 4, 3]If operations are not expensive, why not :-)
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.