結果 : wait for a function to finish python