0 out of 464 challenges solved

Max Difference in Pairs

Write a Python function `max_difference` that takes a list of tuples as input. Each tuple contains two integers. The function should calculate the absolute difference between the two integers in each tuple and return the maximum difference found among all the tuples.

#### Example Usage
```python [main.nopy]
print(max_difference([(3, 5), (1, 7), (10, 3), (1, 2)]))  # Output: 7
print(max_difference([(4, 6), (2, 17), (9, 13), (11, 12)]))  # Output: 15
print(max_difference([(12, 35), (21, 27), (13, 23), (41, 22)]))  # Output: 23
```

#### Constraints
- The input list will contain at least one tuple.
- Each tuple will contain exactly two integers.
- The integers can be positive, negative, or zero.
def max_difference(tuple_list):
    """
    Calculate the maximum absolute difference between pairs in a list of tuples.

    Args:
        tuple_list (list of tuple): A list of tuples, each containing two integers.

    Returns:
        int: The maximum absolute difference between the integers in the tuples.
    """
    # Placeholder for the solution
    pass