結果 : python wait until function returns true