In [1]:
def func(arg1, arg2, arg3):
    print(arg1)
    print(arg2)
    print(arg3)

In [2]:
l = ['one', 'two', 'three']

In [3]:
func(*l)


one
two
three

In [4]:
func(*['one', 'two', 'three'])


one
two
three

In [5]:
t = ('one', 'two', 'three')

In [6]:
func(*t)


one
two
three

In [7]:
func(*('one', 'two', 'three'))


one
two
three

In [8]:
# func(*['one', 'two'])
# TypeError: func() missing 1 required positional argument: 'arg3'

In [9]:
# func(*['one', 'two', 'three', 'four'])
# TypeError: func() takes 3 positional arguments but 4 were given

In [10]:
def func_default(arg1=1, arg2=2, arg3=3):
    print(arg1)
    print(arg2)
    print(arg3)

In [11]:
func_default(*['one', 'two'])


one
two
3

In [12]:
func_default(*['one'])


one
2
3

In [13]:
# func_default(*['one', 'two', 'three', 'four'])
# TypeError: func_default() takes from 0 to 3 positional arguments but 4 were given

In [14]:
def func_args(arg1, *args):
    print(arg1)
    for arg in args:
        print(arg)

In [15]:
func_args(*['one', 'two'])


one
two

In [16]:
func_args(*['one', 'two', 'three'])


one
two
three

In [17]:
func_args(*['one', 'two', 'three', 'four'])


one
two
three
four