List Comprehensions

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Dec 22 11:34:07 EST 2014


On 22/12/2014 05:42, Ganesh Pal wrote:
> Hi ,
>
> (a)  I was trying to reduce the below piece of code using List
> comprehension ? Any suggestion please let me know
>
>       for opt in options:
>            opt['result'] = Queue.Queue()
>            tmp_thread = pause.Thread(opt)
>            threads.append(tmp_thread)
>             tmp_thread.start()
>

If it ain't broke don't fix it :)

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list