fonksiyon ve argüman örnekleri

This commit is contained in:
Mert Gör ☭ 2023-05-25 07:08:25 +03:00
parent 9f80640d6a
commit 76748892f2
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
3 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,4 @@
def foo(a, b, c, d, e, f):
print('a = {}, b = {}, c = {}, d = {}, e = {}, f = {}'.format(a, b, c, d, e, f))
foo(10, 20, e = 30, *(40, 50), f = 60)

View File

@ -0,0 +1,4 @@
def foo(a, b, c, d, e, f):
print('a = {}, b = {}, c = {}, d = {}, e = {}, f = {}'.format(a, b, c, d, e, f))
foo(10, e=50, *(30, 40), **{'d':100, 'f': 200})

View File

@ -0,0 +1,5 @@
def foo(a, b, c, d, e, f):
print('a = {}, b = {}, c = {}, d = {}, e = {}, f = {}'.format(a, b, c, d, e, f))
foo(10, 20, *[40], **{'d':100}, **{'e':200, 'f': 300})