Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
oorrja
GitHub Repository: oorrja/learntosolveit
Path: blob/master/languages/python/design_func_args.py
1240 views
1
def fun1(arg):
2
print(arg)
3
4
def fun2(arg,arg2):
5
print(arg, arg2)
6
7
def fun3(arg, *arg2):
8
print(arg, arg2)
9
10
def fun4(*arg):
11
print(arg)
12
13
def fun5(**kw):
14
print(kw)
15
16
def fun6(*arg, **kw):
17
print(arg)
18
19
20
fun1(10)
21
fun2(10,20)
22
fun3(10,20,30)
23
fun4(10,20,30,40)
24
fun5(a=10,b=20)
25
fun6(10,20,40)
26
27