编写Python函数以找到列表中的最大值和最小值。

[12, 36, 42, 7, 39]
```python
def find_limits(lst):
    return min(lst), max(lst)

lst = [12, 36, 42, 7, 39]
min_val, max_val = find_limits(lst)
print("Minimum Value:", min_val)
print("Maximum Value:", max_val)
```

输出:

```
Minimum Value: 7
Maximum Value: 42
```