def get_ordinal(n):
    """Convert number to its ordinal (e.g., 1 to 1st)

    Parameters
    ----------
    n : int
        Number to be converted to ordinal

    Returns
    ----------
    str
        the ordinal of n
    """
    return "%d%s" % (
        n,
        "tsnrhtdd"[(n // 10 % 10 != 1) * (n % 10 < 4) * n % 10 :: 4],
    )