Kernel: Python 3
label.multiply
This function is overloaded, it supports these signatures:
label.multiply(l)The product (i.e., the concatenation) of two labels:
a.multiply(b)=>ab.label.multiply(num)The repeated multiplication (concatenation) of an label with itself:
a.multiply(3)=>aaa.
Precondition:
nummust be nonnegative.
Examples
In [1]:
Simple Multiplication
Instead of a.multiply(b), you may write a * b.
In [2]:
Out[2]:
In [3]:
Out[3]:
In [4]:
Out[4]:
Repeated Multiplication
Instead of a.multiply(3), you may write a ** 3.
In [5]:
Out[5]:
In [6]:
Out[6]:
In [7]:
Out[7]: