Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65108

how to iterate all sub-element in a list

Newsgroups comp.lang.python
Date 2014-01-31 02:16 -0800
Message-ID <412b4d42-acba-4609-bd6d-e4d5c32db035@googlegroups.com> (permalink)
Subject how to iterate all sub-element in a list
From seaspeak@gmail.com

Show all headers | View raw


a list like L = [[1, 2], [3, 4, 5], [6]], which has
random numbers of list, which has random numbers.

How do I get another list m = [1, 2, 3, 4, 5, 6] in a succinct way? ( or iterate them)
I should provide my own solution, but I really can't come out with one.

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

how to iterate all sub-element in a list seaspeak@gmail.com - 2014-01-31 02:16 -0800
  Re: how to iterate all sub-element in a list Skip Montanaro <skip@pobox.com> - 2014-01-31 04:29 -0600
    Re: how to iterate all sub-element in a list seaspeak@gmail.com - 2014-01-31 02:42 -0800
      Re: how to iterate all sub-element in a list Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-31 14:48 +0000
        Re: how to iterate all sub-element in a list seaspeak@gmail.com - 2014-01-31 08:23 -0800
  Re: how to iterate all sub-element in a list Peter Otten <__peter__@web.de> - 2014-01-31 11:48 +0100
    Re: how to iterate all sub-element in a list Rustom Mody <rustompmody@gmail.com> - 2014-01-31 04:12 -0800

csiph-web