Min and Max Swapping¶
You are required to deliver the following function in the module minmax_swap (file minmax_swap.py):
- minmax_swap(l1, l2)¶
such that
For example:
>>> l1 = [1.0, 2.5, 3.8, 0.0, 1.0] >>> l2 = [2.0, 0.0, 5.0] >>> minmax_swap(l1, l2) >>> l1 == [2.0, 2.5, 5.0, 0.0, 1.0] and l2 == [1.0, 0.0, 3.8] True
Doctests are available in the minmax_swap.test file.