parametre default
This commit is contained in:
parent
88e8f671e7
commit
0e56cb329a
9
python-temel/parametre.default.py
Normal file
9
python-temel/parametre.default.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
def foo(a, b = 100, c = 200):
|
||||
print('a = ', a, 'b = ', b, 'c = ', c)
|
||||
|
||||
foo(1) # foo(1, 100, 200)
|
||||
foo(1, 2) # foo(1, 2, 200)
|
||||
foo(1, 2, 3) # foo(1, 2, 3)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user