News for hackers. Stuff that matters.
Re:A (deceptively tricky?) Python question by aviv on Wednesday May 05, 2010 @01:39AM (#1320420)
Try this for when you need to fill 2 blank tiles:

  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)]
Re:A (deceptively tricky?) Python question by fragmede on Wednesday May 05, 2010 @11:15AM (#1321426)
Re:A (deceptively tricky?) Python question by noaharc on Wednesday May 05, 2010 @12:47PM (#1321710)
Many thanks! I'm using it now.