Python: How to create an empty list and append items to it?

In this article, first we will discuss different ways to create an empty list and then we will see how to append elements to it using for loop or one liner list comprehension. There are two ways to create an empty list in python i.e. using [] or list(). Let’s check out both of them … Continue reading Python: How to create an empty list and append items to it?