13 lines
351 B
Python
13 lines
351 B
Python
# parameters.variable.positional.py
|
|
def minimum(*n):
|
|
# print(type(n)) # n is a tuple
|
|
if n: # explained after the code
|
|
mn = n[0]
|
|
for value in n[1:]:
|
|
if value < mn:
|
|
mn = value
|
|
print(mn)
|
|
|
|
minimum(1, 3, -7, 9) # n = (1, 3, -7, 9) - prints: -7
|
|
minimum() # n = () - prints: nothing
|