How to convert list of tuples into a single list of unique values ?

Jeffrey Drake jpt.d at rogers.com
Thu Jan 10 06:37:50 EST 2002


You would have to check the resulting tuple, but you can go like this:
t = list((a,b,c) + (d,,f) + (b,a,j))

On Thu, 10 Jan 2002 11:28:48 GMT, pekka niiranen <krissepu at vip.fi>
wrote:

>I have a list of equal size tuples, but a tuple may contain empty values:
>
>t = [ ( a,b,c), (d, ,f) (b,a,j) ]
>
>How can I convert it into a single list of unique values:
>
>l = [a,b,c,d,f,j]
>
>No lambdas, please
>
>-pekka-
>




More information about the Python-list mailing list