Which operator is used for exponentiation in Python?
-
A
^
-
B
**
Correct answer
-
C
*
-
D
//
12 views
Explanation
** is the exponentiation operator. So 2 ** 3 gives 8. The ^ operator is bitwise XOR, not exponentiation.
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ