Given a list of 6-letter words: ['abject','poetry','keypad'] How do I derive this list: ['apk', 'boe', 'jey']
(The original list's first letters, second letters, third letters, etc.) I have a text file of 15280 six-letter words and I want to robotically generate 6x6 word squares. My first attempt returns the right results, but _not in string form_. There's bound to be a really simple approach that I'm just not remembering. def checksolution(sol): maybes = [] for x in range(len(sol)): maybes.append( [y[x] for y in sol] ) print maybes solution=['abject','poetry','keypad'] checksolution(solution) [['a', 'p', 'k'], ['b', 'o', 'e'], ['j', 'e', 'y']] Alan _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor