Home >>Python Built-in Functions >Python list() Function
Python list() function is used to create a list object. A list object is a collection that is ordered and also changeable.
Syntax:list(iterable)
Parameter | Description |
---|---|
iterable | This is a required parameter. It defines a sequence, collection or an iterator object |
x = list(('apple', 'banana', 'mango', 'orange'))
print(x)
x = list((1, 2, 3, 'orange', 5))
print(x)