Sep-17-2018, 06:03 AM
Hello,
I have a looping question for all you Python gurus, because, while I understand the theoretical of iteration, I don't have the creation of loops yet in practice. This forum has helped but I must have an old, thick skull
Here's my question.
If I have this code,
If I was to guess, & I will
, I would say to create a tuple with each .value stored within the tuple. Then use a forLoop to create each argument starting with this code,
Am I in the ballpark?
Thanks,
Phil
I have a looping question for all you Python gurus, because, while I understand the theoretical of iteration, I don't have the creation of loops yet in practice. This forum has helped but I must have an old, thick skull

Here's my question.
If I have this code,
# Cell values sheet['A1'].value = '' sheet['A2'].value = '' sheet['A3'].value = '' sheet['A4'].value = '' sheet['A5'].value = '' sheet['A6'].value = '' sheet['A7'].value = '' sheet['A8'].value = '' sheet['A9'].value = '' sheet['A10'].value = '' sheet['A11'].value = '' sheet['A12'].value = '' sheet['A13'].value = '' sheet['A14'].value = '' sheet['A15'].value = '' sheet['A16'].value = '' sheet['A17'].value = '' sheet['A18'].value = '' sheet['A19'].value = '' sheet['A20'].value = '' sheet['A21'].value = '' sheet['A22'].value = '' sheet['A23'].value = '' sheet['A24'].value = '' sheet['A25'].value = '' sheet['A26'].value = '' sheet['A27'].value = '' sheet['A28'].value = '' sheet['A29'].value = '' sheet['A30'].value = '' sheet['A31'].value = '' sheet['A32'].value = '' sheet['A33'].value = '' sheet['A34'].value = '' sheet['A35'].value = '' sheet['A36'].value = '' sheet['A37'].value = '' sheet['A38'].value = '' sheet['A39'].value = '' sheet['A40'].value = ''and each .value is different, is it worthwhile to create a loop, or what would be the best way to do a loop?
If I was to guess, & I will

sheet['A1'].value = ''while iterating +1 and adding the next sequential value from the tuple.
Am I in the ballpark?
Thanks,
Phil