Apr-11-2021, 01:12 PM
(This post was last modified: Apr-11-2021, 01:12 PM by TheHolyPyGrenade.)
Hi everybody,
I am new to python and have been coming up with different little projects to develop, and currently working of a shift calculator.
The program looks at 10 teams which work a ten week shift pattern.
I have managed to write most of the code, but was wondering is there a way that I can enter a list at any point and produce a cycle of all the elements??
For example the program works out that Team 1(T1) is starting the shift pattern on week 1 so the output will be:
T1 T2 T3 T4 T5 T6 T7 T8 T9 T10
The following week it works out that Team 2(T2) is now starting the shift pattern on week 1 so the output will be:
T2 T3 T4 T5 T6 T7 T8 T9 T10 T1
and so on.
Would the loop method be best or is there another way I could generate the same required outcome??
Thank you
I am new to python and have been coming up with different little projects to develop, and currently working of a shift calculator.
The program looks at 10 teams which work a ten week shift pattern.
I have managed to write most of the code, but was wondering is there a way that I can enter a list at any point and produce a cycle of all the elements??
For example the program works out that Team 1(T1) is starting the shift pattern on week 1 so the output will be:
T1 T2 T3 T4 T5 T6 T7 T8 T9 T10
The following week it works out that Team 2(T2) is now starting the shift pattern on week 1 so the output will be:
T2 T3 T4 T5 T6 T7 T8 T9 T10 T1
and so on.
Would the loop method be best or is there another way I could generate the same required outcome??
Thank you