from typing import Union
from typing import List
from typing import Tuple


def first(data: Union[List, Tuple]):
    """
    Returns first element from list or tuple.
    """
    if isinstance(data, (list, tuple)) and data:
        return data[0]
    return None