Multiple Argument
# Multiple Argument def main():myFunc(1, 2, 3, 4, 5) # multiple argumentdef 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 Argumentsdef 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 Monda..
Python
2016. 4. 28. 18:08