0 out of 464 challenges solved

Convert Tuple String to Integer Tuple

Write a function `tuple_str_to_int` that takes a string representation of a tuple containing integers and converts it into an actual tuple of integers.

#### Function Signature
```python [main.nopy]
def tuple_str_to_int(tuple_str: str) -> tuple:
```

#### Input
- `tuple_str` (str): A string representation of a tuple, e.g., `"(1, 2, 3)"`.

#### Output
- Returns a tuple of integers, e.g., `(1, 2, 3)`.

#### Example Usage
```python [main.nopy]
print(tuple_str_to_int("(7, 8, 9)"))  # Output: (7, 8, 9)
print(tuple_str_to_int("(1, 2, 3)"))  # Output: (1, 2, 3)
print(tuple_str_to_int("(4, 5, 6)"))  # Output: (4, 5, 6)
print(tuple_str_to_int("(7, 81, 19)"))  # Output: (7, 81, 19)
```
def tuple_str_to_int(tuple_str: str) -> tuple:
    """
    Convert a string representation of a tuple into an actual tuple of integers.

    Args:
    tuple_str (str): A string representation of a tuple.

    Returns:
    tuple: A tuple of integers.
    """
    # Write your code here
    pass