Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

craeting a method that can take any number of arguments in python

def my_min(*args):
    result = args[0]
    for num in args:
        if num < result:
            result = num
    return result

my_min(4, 5, 6, 7, 2)
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #craeting #method #number #arguments #python
ADD COMMENT
Topic
Name
1+6 =