Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def min_max(matrix: list, func_check):
- list_matrix = matrix.copy()
- list_var = []
- for item in list_matrix:
- list_var.append(func_check(item))
- return func_check(list_var)
- print(min_max([[1, 2, 3, -1000, 4], [1, 2, 4, 1, 1000]], max))
- print(min_max([[1, 2, 3, -1000, 4], [1, 2, 4, 1, 1000]], min))
Add Comment
Please, Sign In to add comment