def valid_hgt(hgt):
    """gt (Height) - 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."""
    unit = hgt[-2:]
    value = hgt[:-2]
    if len(value) < 1:
        return False
    if unit == "cm":
        if 150 <= int(value) <= 193:
            return True
    if unit == "in":
        if 59 <= int(value) <= 76:
            return True
    return False