Quick Print – CSKC
Sign In

Search

siteicon
Code Learning #PYTHON#9420 Back

List creation variations

Lists can be created by direct declaration of values that go into it using square brackets. Constructor based creation can also be used.

Source Code

		 

Run Output

[10, 20, 30]
[10]
[10]
['A', 'B', 'C', 'D']
[1, 2, 3, 4, 5]
[10, 20, 30]