isimli argüman

This commit is contained in:
Mert Gör 🇹🇷 2023-05-24 09:41:34 +03:00
parent edbf11107d
commit 70d9e1237f
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

View File

@ -0,0 +1,7 @@
def foo(*a, b):
print('a = {}, b = {}'.format(a, b))
foo(10, b = 100) # a = (10,), b = 100
foo(10, 20, b = 100) # (10, 20), b = 100
foo(10, 20, b = 100) # (10, 20), b = 100
#foo(10, 20, 30) # geçerli değil! b değer almamış