We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2300756 commit 9fa7a63Copy full SHA for 9fa7a63
1 file changed
variable_args.py
@@ -6,4 +6,11 @@ def sum(*args):
6
return total
7
8
result = sum(1,8, 2, 3, 15, 4, 5)
9
-print(f"The sum of the numbers is: {result}")
+print(f"The sum of the numbers is: {result}")
10
+
11
12
+# **key arguments- or variable-length keyword arguments allow you to pass a variable number of keyword arguments to a function.
13
+def print_info(**kwargs):
14
+ for key, value in kwargs.items():
15
+ print(f"{key}: {value}")
16
+print_info(name="Adil", age=25, city="New York")
0 commit comments