from typing import Sequence


def all_of_type(seq: Sequence, element_type) -> bool:
    """Return true if all elements in sequence are of the same type."""
    for item in seq:
        if type(item) != element_type:
            return False
    return True