def validate_height(passport: dict) -> bool:
    """
    Return True if a number followed by either cm or in:
        If cm, the number must be at least 150 and at most 193.
        If in, the number must be at least 59 and at most 76.

    DOCTEST
    >>> validate_height(passport={"ecl": "gry", "hgt": "60in"})
    True
    >>> validate_height(passport={"ecl": "gry", "hgt": "190cm"})
    True
    >>> validate_height(passport={"ecl": "gry", "hgt": "190in"})
    False
    >>> validate_height(passport={"ecl": "gry", "hgt": "190"})
    False
    """

    height = passport.get("hgt")
    if not height:
        return False

    if "cm" in height:
        height = int(height.strip("cm"))
        if 150 <= height <= 193:
            return True
        else:
            return False
    if "in" in height:
        height = int(height.strip("in"))
        if 59 <= height <= 76:
            return True
    return False