Web
Opt
tools
List Methods
Create
Comprehension
Nested
Methods
List Creation Methods
Creation Method
Literal [1, 2, 3]
list() Constructor
range() Function
List Comprehension
Empty List []
Repeated Values
Enter List Items
Add Field
Run Visualization
Console Output
>
List Creation Visualizer
Interactive Python List Creation Methods
0
Elements
Created List
Empty List
List Properties
0
Length
list
Type
Method
No
Has Items
Creation Methods Overview
Literal Syntax
my_list = [1, 2, 3]
Constructor
my_list = list([1, 2, 3])
Range Function
my_list = list(range(0, 5))
Comprehension
my_list = [x*2 for x in [1,2,3]]