Skip to content

Commit 19f0acc

Browse files
committed
Function with *args and **kwargs
1 parent 70898c9 commit 19f0acc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

function_params.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

2-
def print_msg(msg, error="No Error", *kwargs):
2+
def print_msg(msg, error="No Error", *args, **kwargs):
33
print("Log : "+error+":" + msg)
4-
print(kwargs)
4+
print("Args " , args)
5+
print("Kwargs ", kwargs)
56

67

7-
print_msg("This will be logged","File not found", "1", "12", "213", "32113")
8+
print_msg("This will be logged","File not found") #,"-13", "-1", "0",key_1="1,2,3,4", key_2="5,6,7,8")

0 commit comments

Comments
 (0)