New course! Every coder should learn Generative AI!
Try a free lesson2 Answers
+ 4
+ 4
You can pass as many arguments as you like. (There is a limit, but normally you will not reach it...)
def calc(*args):
print(args)
calc(1,2,3,4,'hello',5,6,7,8)
# output: (1, 2, 3, 4, 'hello', 5, 6, 7, 8)