Answers for "how to get args of a function python"

0

python get args

import sys

print(sys.argv)
Posted by: Guest on February-23-2021
0

args in python

def add(*args):
    total = 0
    for i in args:
        total += i
    
    return total

print(add(5,5,10))
Posted by: Guest on June-24-2021

Python Answers by Framework

Browse Popular Code Answers by Language