Aug-26-2019, 09:54 AM
(Aug-26-2019, 08:18 AM)ThomasL Wrote: And if you need the index of each element in an iterable (e.g. list) you should do it this way:
patients = ['Bob', 'Alice', 'Guido', 'Janet', 'Pamela'] for index, patient in enumerate(patients): print(f'{index}: {patient}')
... and if you want indices starting other than from zero use start= in enumerate
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.