Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

kwargs handling multiple arguments and iterating them loop

def test_var_args(f_arg, *argv):
    print("first normal arg:", f_arg)
    for arg in argv:
        print("another arg through *argv:", arg)

test_var_args('yasoob', 'python', 'eggs', 'test')
Source by book.pythontips.com #
 
PREVIOUS NEXT
Tagged: #kwargs #handling #multiple #arguments #iterating #loop
ADD COMMENT
Topic
Name
6+1 =