import re


def flat_number(address):
    """
    Extracts flat/apartment number from an address string.

    Parameters
    ----------
    address: str
        address string to extract flat/apartment number from

    Returns
    -------
    str
        flat/apartment number

    Example
    --------
    >>> address = 'FLAT 5, 15 PARK ROAD'
    >>> flat_number(address)
    '5'
    """

    # Upper Case
    address = address.upper()

    # Get FLAT/APARTMENT NUMBER
    flat = re.findall(r'FLAT (\d+)', address)
    apart = re.findall(r'APARTMENT (\d+)', address)

    if len(flat) > 0:
        number = flat[0]

    else:
        if len(apart) > 0:
            number = apart[0]
        else:
            number = '0'

    # Remove zeros & leading zeros
    if number != '0':
        number = number.lstrip('0')
    else:
        number = None

    return number