Account
Categories

List Repetition (*) Operation


Definition:

It repeats the data of one or more lists at the given specific times using the asterisk (*) repetition operator.

Syntax:

list * number

Example:

a = [1, 2]
b = a * 3
print(b)

Output:

Exercise

Create a list a = [3, 4] and repeat it 2 times using Python.