On Mon, Dec 3, 2012 at 11:58 AM, <subhabangal...@gmail.com> wrote: > Dear Group, > > I have a tuple of list as, > > tup_list=[(1,2), (3,4)] > Now if I want to covert as a simple list, > > list=[1,2,3,4] > > how may I do that? > > If any one can kindly suggest? Googling didn't help much.
If you know they are always exactly two levels deep, you can use nested loops (in comprehension form): [item for tuple_ in list_ for item in tuple_] That could also be written how John recommended, in three lines. > > Regards, > Subhabrata. > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list