text_plain_output_1.png
x = 3

xs = [3, 1, 2]

xs.append('bar')

x = xs.pop()

nums = list(range(5))
nums[2:4] = [8, 9]

nums = [0, 1, 2, 3, 4]
squares = []
for x in nums:
    squares.append(x ** 2)

nums = [0, 1, 2, 3, 4]
squares = [x ** 2 for x in nums]

nums = [0, 1, 2, 3, 4]
even_squares = [x ** 2 for x in nums if x % 2 == 0]

nums = [0, 1, 2, 3, 4]
even_num_to_square = {x: x ** 2 for x in nums if x % 2 == 0}
print(even_num_to_square)