Multiplication

suggest change
a, b = 2, 3

a * b                  # = 6

import operator
operator.mul(a, b)     # = 6

Possible combinations (builtin types):

Note: The \* operator is also used for repeated concatenation of strings, lists, and tuples:

3 * 'ab'  # = 'ababab'
3 * ('a', 'b')  # = ('a', 'b', 'a', 'b', 'a', 'b')

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents