Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 269 Bytes

File metadata and controls

20 lines (16 loc) · 269 Bytes

Literal Syntax

Lists can be initialized separating enclosing comma separated values in square brackets [].

Example 1

>>> l = [1, 2]
>>> l
[1, 2]

Example 2

>>> a = 'AA'
>>> b = 'BB'
>>> l = [a, b]
>>> l
['AA', 'BB']