Create Empty List in Python (2 Examples)
The post will contain the following content:
Let’s get started!
Example 1: Create Empty Lists using Square Brackets
In the first example, we will utilize square brackets to create an empty list. The square bracket notation in Python is the standard way to denote lists.
When the user does not include any elements in square brackets, an empty list will be created.
empty_list =  # create empty list print(empty_list) # print empty list # 
As seen, the empty list is successfully created. Now let’s see another alternative!
Example 2: Create Empty Lists using List Constructor
The list() function in Python serves as a constructor for the list data type. When invoked without any arguments, it returns an empty list.
empty_list_2 = list() # create empty list print(empty_list_2) # print empty list # 
You can see above, how an empty list can be created using
Video, Further Resources & Summary
Do you need further info on the contents of the present article? Then you may want to have a look at the following video tutorial on my YouTube channel. I’m explaining the examples of this article in the video:
The YouTube video will be added soon.
Also, you could read the related articles that I have published on my website. You can find a selection of tutorials on topics such as character strings and lists below:
- Check if List of Lists is Empty in Python
- Append to Empty List in Python
- Remove Empty String from List in Python
- Create Empty 2D List in Python
- Python Programming Language
In this tutorial you have learned how to build empty lists in Python programming. In case you have further questions or comments, don’t hesitate to let me know in the comments.
This page was created in collaboration with Cansu Kebabci. Have a look at Cansu’s author page to get more information about her professional background, a list of all his tutorials, as well as an overview on her other tasks on Statistics Globe.