ভ্যারিবেল লেনথ আর্গুমেন্টস
def greet(*names):
"""This ‘ * ’ converts the argument
into variable length argument """
# names is a tuple with arguments
for name in names:
print("Hello",name)
greet("Ayub","Meraj","Rashed","Tonmoy","Younus","Imran",)Hello Ayub
Hello Meraj
Hello Rashed
Hello Tonmoy
Hello Younus
Hello Imran>>> def add(*nums):
total = 0
for num in nums:
total += num
return total
>>> add(3,4,4)
11Last updated
Was this helpful?