結果 : wait for a function to complete python