Google News
logo
Python Program to Using the list() constructor to make a list
In the following example of Python program to create a list using the `list()` constructor :
Program :
# Using list() constructor to create a list
my_list = list(("apple", "banana", "cherry"))
print(my_list)
Output :
['apple', 'banana', 'cherry']
In the above program, we used the `list()` constructor to create a list `my_list` with three elements: "apple", "banana", and "cherry". We used double parentheses to pass these elements as an argument to the constructor.

We then printed the list using the `print()` function, which outputted `['apple', 'banana', 'cherry']`.