I am very new to Python and have only just bought my first "Crashcourse in Python" book - originally my choice of language was PHP.
My Objective:
I desire a script that will output on-screen a list of all possible permutations of a particular pattern. Order is unimportant.
The raw data and pattern (the dataset will not change):
List1 = ['CA', 'CB', 'CC', 'CD', 'CE', 'CF', 'CG', 'CH', 'CJ', 'CK', 'CL', 'CM', 'CN', 'CO', 'CP', 'CR', 'CS', 'CT', 'CU', 'CV', 'CW', 'CX', 'CY']
List2 = ['51', '02', '52', '03', '53', '04', '54', '05', '55', '06', '56', '07', '57', '08', '58', '09', '59', '10', '60', '11', '61', '12', '62', '13', '63', '14', '64', '15', '65', '16', '66', '17']
List3 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
List4 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
List5 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
String Output:
[List1] + [List2] + [List3] + [List4] + [List5]
Example:
Resulting in lots of 7 character alphanumeric strings
Crap Maths:
Is my wonky maths correct in that I'd be looking at 10,174,464 entries? List1(23) x List2(32) x List3,4,5(13,824).
My question:
Is itertools the best function to use for this? If so, how? If not, what?
See Question&Answers more detail:
os