from typing import List


def text_to_bits(
    text: str,
    encoding: str = "utf-8",
    errors: str = "surrogatepass",
) -> List[int]:
    """
    Takes a string and returns it's binary representation.

    Parameters
    ----------
    text: str
        Any string.

    Returns
    -------
    A list of 0s and 1s.
    """
    bits = bin(int.from_bytes(text.encode(encoding, errors), "big"))[2:]
    bits_list = []
    for bit in bits.zfill(8 * ((len(bits) + 7) // 8)):
        bits_list.append(int(bit))
    return bits_list