Yet another thread showing how awful I am at programming...
I've got a list called week_pattern
It contains a list of 52-character strings which represent whether something occurs in a certain week. The list is below:
['0000000000111111111100000000000000000000000000000000', '0000000001000000000000000000000000000000000000000000', '0000000000000000000000000011111111000011100000000000', '0000000000000101111100000000000000000000000000000000', '0000000001111111111100000000000000000000000000000000', '0000000000111111111100000000000000000000000000000000', '0000000000000000000000000001111111000001100000000000', '0000000000111000000000000000000000000000000000000000', '0000000001111111111100000000000000000000000000000000', '0000000000000000000000000011111111000011100000000000', '0000000000000000000000000011111111000011100000000000', '0000000000000111111100000000000000000000000000000000', '0000000000000000000000000000000000000000001000000000', '0000000000000000000000000001111111000001100000000000', '0000000000000000101000000000000000000000000000000000', '0000000000000000000000000000000000000001000000000000', '0000000001111111111100000000000000000000000000000000']
As you can see, the number 0's mean that there is nothing happening and the number 1's mean that something is happening in those weeks. Here there are 17 strings relating to 17 subjects..
How would I go about assigning them weeks? What i've thought about is this:
0 = false 1 = true for all 0's, assign false for all 1's, check the index against a reference list containing the start date of the week
Problem is checking each individual one and zero, as opposed to a big 52-character integer.