順帶一提的是,若要加總一個list,可以直接使用Python的內建函數sum()來達成即可。 def varAve(*n): return sum(n)/len(n) print(varAve(1,2,3,8,9))
確定! 回上一頁