0

what dose * mean

23rd Sep 2016, 9:07 PM
bob
bob - avatar
8 Respuestas
+ 2
* is the operator for multiplication
23rd Sep 2016, 9:12 PM
Amarie
+ 1
* is for multiplication
4th Oct 2016, 2:07 AM
Hritik Shekhar
Hritik Shekhar - avatar
0
thanks
23rd Sep 2016, 9:13 PM
bob
bob - avatar
0
* means multiplication
23rd Sep 2016, 9:27 PM
Hritik Shekhar
Hritik Shekhar - avatar
0
* means multiply
4th Oct 2016, 1:57 AM
Aanshwi
0
Pretty much means times or multiply
26th Nov 2016, 8:17 AM
16davidsonjes
0
davidsonjes : not exactly, though. try "a"*10 or [1]*10
26th Nov 2016, 1:58 PM
Amaras A
Amaras A - avatar
- 1
It means (under the hood), when you do a*b: It tries to do a.__mult__(b) if there is a dunder __mult__ in the class of a. If it is not there, it tries b.__rmult__(a). If there is still not an operator for a*b, it raises an Error. A dunder a a __double under__ method that can be overwritten and that gives you ability to used shorter notations (see my example with generalised type, not just int)
25th Sep 2016, 11:32 AM
Amaras A
Amaras A - avatar