-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction thing
More file actions
40 lines (18 loc) · 958 Bytes
/
function thing
File metadata and controls
40 lines (18 loc) · 958 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
#def recursion(arr , index = 0 , current_ss = []):
aama ghana argument che but jyare function ne call kari tyare
khali arr j aapi baki vastu n aapi to chale e by default value j lai le
arr: This is the required argument (no default value). You must provide it when calling
the function.
index=0: This has a default value of 0. If you don't pass a value for index,
Python automatically uses 0 as the default.
current_subset=[]: This also has a default value of an empty list ([]).
If you don't pass a value for current_subset, Python automatically uses the empty list as the default.
How the Call Works
When you call:
generate_subsets(arr)
Default Arguments in Python
In Python, when you define a function with parameters that have
default values, you don't need to explicitly pass values for
those parameters when calling the function.
If you omit them, the function uses the default values you
specified in its definition.