There was long thread discussing flattening of a list on this list :).
See the link below.

https://mail.python.org/pipermail/python-list/2014-March/669256.html

On 10 April 2014 10:44, length power <elearn2...@gmail.com> wrote:
>>>> x=["a","b",["c","d"],"e"]
>>>> y=x[2]
>>>> y
> ['c', 'd']
>>>> x.insert(2,y[0])
>>>> x
> ['a', 'b', 'c', ['c', 'd'], 'e']
>>>> x.insert(3,y[1])
>>>> x
> ['a', 'b', 'c', 'd', ['c', 'd'], 'e']
>>>> del x[4]
>>>> x
> ['a', 'b', 'c', 'd', 'e']
>>>>
> maybe there is a more smart way to do.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
:-)balaji
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to