1. Defining lists. In Python
, a list is an object that holds a collection of items.
A list is defined by enclosing a set of set of comma-separated values inside of a pair of brackets. This is a list
of strings, where a string is defined by enclosing text in quotation marks.
$$\text{a_list} = \text{[``this", ``is", ``a", ``list"]}$$
A list can be empty, can contain multiple types (e.g. numbers and strings), and can contain multiple lists.
$$\text{a_list_of_lists} = [[0,1,2],[3,4,5]]$$
Define lists that contain the following items.
1. The integers between 1 and 5.
2. The sequence of letters a, b, c, d.