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:
num
must be nonnegative.
Examples
In [1]:
Simple Multiplication
Instead of a.multiply(b)
, you may write a * b
.
In [2]:
In [3]:
In [4]:
Repeated Multiplication
Instead of a.multiply(3)
, you may write a ** 3
.
In [5]:
In [6]:
In [7]: