0

What does ** mean in Python?

please give examples

11th Jun 2017, 3:50 PM
Will F
Will F - avatar
2 Respuestas
+ 15
Exponentation 2**2=4 3**2=9 4**2=16 ......
11th Jun 2017, 3:51 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 2
** -> using the magic method __pow__ Let's say this is our code: a = 5 B = 2 Typing a**B is the same as (a).__pow__(B) The name for this sign is "exponential" This topic is explained more in the object oriented programming lessons
11th Jun 2017, 4:35 PM
Elad Goldenberg
Elad Goldenberg - avatar