📜  如何在 python 代码示例中使用不定数量的 args

📅  最后修改于: 2022-03-11 14:46:01.718000             🧑  作者: Mango

代码示例1
# use *args to allow user to input as many argumnets as they want
def mean(*args):
  return sum(args)/len(args)