写一个程序来查找给定整数列表中的最大值和最小值。
[4, 7, 2, 9, 10, 1]
Python程序：

```python
numbers = [4, 7, 2, 9, 10, 1]
max_num = max(numbers)
min_num = min(numbers)
print(f"The maximum number is {max_num} and the minimum number is {min_num}")
```

输出：

```
The maximum number is 10 and the minimum number is 1
```