I have a list of data that includes both command strings as well as the alphabet, upper and lowercase, totaling to 512+ (including sub-lists) strings. I want to parse the input data, but i cant think of any way to do it properly other than starting from the largest possible command size and cutting it down until i find a command that is the same as the string and then output the location of the command, but that takes forever. any other way i can think of will cause overlapping. im doing this in python
say:
L = ['a', 'b',['aa','bb','cc'], 'c']
for 'bb' the output would be '0201' and 'c' would be '03'
so how should i do this?