Magic Of * In Python
In this article I’ll explain about many different ways, we can use * a.k.a. asterisk in Python.
Let’s get started.
Create Collection With Repeated Elements
Using * operator we can duplicate the elements as many times as we want. Below is the example code where every element is added 3 times:
lst = [4,3,5] * 3