Complete the code to declare an empty list named arr.
arr = [1]In Python, an empty list is declared using square brackets [].
Complete the code to create a list numbers with elements 1, 2, and 3.
numbers = [1]Lists with elements are created using square brackets with elements separated by commas.
Fix the error in the code to initialize a list letters with 'a', 'b', 'c'.
letters = [1]Lists use square brackets. Parentheses create tuples, curly braces create sets.
Fill both blanks to create a list evens with even numbers from 2 to 10.
evens = [[1] for [2] in range(2, 11, 2)]
The list comprehension uses i as both the output expression and loop variable since the range directly generates the even numbers.
Fill all three blanks to create a list squares of squares of numbers from 1 to 5.
squares = [[1] for [2] in [3](1, 6)]
range for iteration.The list comprehension squares each number num in the range from 1 to 5.