-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.py
More file actions
54 lines (32 loc) · 861 Bytes
/
functions.py
File metadata and controls
54 lines (32 loc) · 861 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
47
48
49
50
#leart bout *args, **kwargs (positional multi arguments and keyworded multi arguments)
def arrr(normal,*args,**kwargs):
for i in args:
print(f"{i}")
dict = {}
for key,value in kwargs.items():
dict[key] = value
return dict,i,normal
result = (1,2,3,4,5)
data = {
"city":"mumbai",
"genital":"penis",
"sex":"male",
"hinged":"no"
}
print(arrr("sexy sahil",*result,**data))
# default arguments
def info(phone =None,**biodata):
"YO GUYS JUST WROTE A FUNCTION TO FLEX MY KWARGS , AND DEFAULT ARGUMENT UNDERSTANDING?"
name = input("Enter ur name: ")
data = {}
for key,values in biodata.items():
data[key]=values
return name, phone, data
sahil = {
"city":"mumbai",
"country":"india",
"gurl":"brazilian"
}
info_result=info(**sahil)
print(info_result)
help(info)