Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python function with infinite parameters

def myMax( *args ):
    max= arg[0]
    for a in args[1:]:
        if a > max: max= a
    return max

More examples: https://www.linuxtopia.org/online_books/programming_books/python_programming/python_ch15s09.html#:~:text=Python%20lets%20us%20define%20a,be%20collected%20into%20a%20tuple%20.
Source by www.linuxtopia.org #
 
PREVIOUS NEXT
Tagged: #python #function #infinite #parameters
ADD COMMENT
Topic
Name
6+3 =