[Tutor] how to return an object generated during a python threading code

Steven D'Aprano steve at pearwood.info
Sat Dec 10 18:04:29 CET 2011


Massimo Di Stefano wrote:
[...]
> it just print out the list generated during the thread execution, while i'm tring to return it. 

Since lista is a mutable global variable, you don't need to return it. Just 
look at lista once the threads have completed its work and you will find the 
content you expect.



-- 
Steven


More information about the Tutor mailing list