Aug-26-2019, 05:57 AM
(Aug-22-2019, 10:46 AM)perfringo Wrote: In Python you should never do this:
>>> patients = ['Bob', 'Alice', 'Guido', 'Janet', 'Pamela'] >>> for x in range(len(patients)): ... print(patients[x])In Python you should iterate directly over items:
>>> for patient in patients: ... print(patient)
Thank you!
I'm still learning, and I guess I'm also in the process of distinguishing between the code I can write, and the code I SHOULD write. I hope that with time, I'm going to be better at writing a neater and more suitable code. I am grateful to all of you who have made me aware of how to do it better.

All the best,
newbieAuggie2019
"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs