# Multiple Argument
def main():
myFunc(1, 2, 3, 4, 5)
# multiple argument
def myFunc(one, two, *args):
print("the values are {} {} {}".format(one, two, args))
ourFunc(1, 2, 3, 4, 5, 6, onee = "Monday", twoo = "Tuesday")
#Key Word Arguments
def ourFunc(a, b, c, *args, **kwargs):
print("hello", kwargs['onee'], kwargs['twoo'])
if __name__ == "__main__": main()
# 결과
the values are 1 2 (3, 4, 5)
hello Monday Tuesday
댓글 영역