結果 : how to write thread safe code in python