给定一个列表[1, 2, 3, 4, 5, 6, 7, 8, 9]，编写一段Python代码，生成一个新列表，其中仅包含偶数。
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]
```python
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]
even_numbers = [num for num in numbers if num % 2 == 0]
print(even_numbers)
```
输出:
```python
[2, 4, 6, 8]
```