Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

args in python

def wrap(*args):
        lis = list(args)  # it is important to convert args into list before looping, args take tuple as a argument 
        for i in range(len(lis)):
            lis[i] = lis[i] * 2
        args = tuple(lis)
        return args
print(wrap(2,3,4,5,6))
 
PREVIOUS NEXT
Tagged: #args #python
ADD COMMENT
Topic
Name
5+1 =