What does the Double Star operator mean in Python?
Answers
For numeric data types double asterisk (**) is defined as exponentiation operator
>>> a=10; b=2
>>> a**b
100
>>> a=1.5; b=2.5
>>> a**b
2.7556759606310752
>>> a=3+2j
>>> b=3+5j
>>> a**b
In a function definition, argument with double asterisks as prefix helps in sending multiple keyword arguments to it from calling environment
>>> def function(**arg):
for i in arg:
print (i,arg[i])
>>> function(a=1, b=2, c=3, d=4)
a 1
b 2
c 3
d 4
We use the name kwargs with the double star. The reason is because the double star allows us to pass through keyword arguments (and any number of them). A keyword argument is where you provide a name to the variable as you pass it into the function.
IF MY ANS IS NOT BAD THEN PLZ...... FOLLOW ME
Answer:
Double Star in python is an exponent; it computes the power
Explanation:
Ex- 5(double star)2= 25