-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfun_part_2.py
More file actions
46 lines (30 loc) · 849 Bytes
/
fun_part_2.py
File metadata and controls
46 lines (30 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from multiprocessing.sharedctypes import Value
def arb_args(*args):
print(*args)
arb_args ("\nalpha","\nbeta","\ncharlie")
#---------------------------------------------------------------------
def integers(a, b):
def inner_integers_1():
return a + b
def inner_integers_2():
return a - b
return inner_integers_1() + inner_integers_2()
print(integers(1,5))
print(integers(8,4))
print(integers(2,2))
#---------------------------------------------------------------------
def manyParams (** kwargs):
# print(kwargs)
lstStr=[]
lstNum=[]
lstNonNum=[]
for arg in kwargs.values():
print(arg)
if (type(arg) ==str):
lstStr.append(arg)
elif (type(arg) ==int):
lstNum.append(arg+3)
else:
lstNonNum.append(arg)
return lstStr,lstNum,lstNonNum
manyParams (a="mz", b= False, c=45)