Arrangements and Combinations · Basic Rules
Lesson 7

Every license plate is a tuple from a set \[L \times L \times D \times D \times L \times L \ ,\] where \(D=\{0,1,\dotsc,9\}\) is the set of ten digits and \(L\) is the Latin alphabet (26 letters). Hence, the answer is \[26^{2} \cdot 10^{2} \cdot 26^{2}=45\ 697\ 600.\] (This answer may be entered as \(\texttt{45697600}\), \(\texttt{26 ** 2 * 10 ** 2 * 26 ** 2}\), or \(\texttt{26 ** 4 * 10 ** 2}\).)
from itertools import product
d, l = '0123456789', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for num, plate in enumerate(product(l, l, d, d, l, l)):
print(num, ' ', *plate, sep='')0 AA00AA
1 AA00AB
2 AA00AC
3 AA00AD
...
45697596 ZZ99ZW
45697597 ZZ99ZX
45697598 ZZ99ZY
45697599 ZZ99ZZ