List() Python

Source URL: https://www.programiz.com/python-programming/methods/built-in/list

Language: python

Created on: 2020-04-08 14:23:52

# empty list
print(list())
#-->[]

# vowel string
vowel_string = 'aeiou'
print(list(vowel_string))
#-->['a', 'e', 'i', 'o', 'u']

# vowel tuple
vowel_tuple = ('a', 'e', 'i', 'o', 'u')
print(list(vowel_tuple))
#-->['a', 'e', 'i', 'o', 'u']

# vowel list
vowel_list = ['a', 'e', 'i', 'o', 'u']
print(list(vowel_list))
#-->['a', 'e', 'i', 'o', 'u']
The Python list() constructor returns a list in Python. In this tutorial, we will learn to use list() in detail with the help of examples.
content_copy