by aviv · 16y ago · 0 comments
import string from itertools import product w = "H_LL_" w_fmt = w.replace('_', '%s') product_args = [list(string.uppercase)] * 2 expanded = [w_fmt % repl for repl in product(*product_args)]