結果 : raise error if list is empty python