from typing import List
from typing import Union


def is_prefix(a: List[Union[int, str]], b: List[Union[int, str]]):
    """Check if `a` is a prefix of `b`."""
    if len(a) >= len(b):
        return False
    for i in range(len(a)):
        if a[i] != b[i]:
            return False
    return True