looping through a list of lists.
rob at cs.brown.edu
Wed Oct 8 18:13:08 CEST 2003
The responder to this post has a cool way of doing it, but it won't
work (I believe) if you have an arbitrary number of sublists. Can you
clarify the problem? Do you have an arbitrary number of sublists? Or
is it always 3?
On Wednesday, October 8, 2003, at 11:04 AM, saoirse_79 wrote:
> I have a list of lists as follows:
> [['-', '-', '-', '-', '-', '-', '-', 'K', 'S', 'A', 'K'],
> ['-', '-', '-', '-', 'L', 'Q', 'Q', 'T', 'N', 'S', 'E'],
> ['T', 'L', 'E', 'E', 'L', 'M', 'K', 'L', 'S', 'P', 'E']]
> I want to be able to read each character and compare it with all
> characters at the same positon in all sublists. Is this possible.
> I have tried a few different methods but nothing seems to allow me to
> compare the sublists character by character.
More information about the Python-list