def thumbIncrementCheck(lmList: list[list[int]]) -> int:
    'Checks whether your thumb is up or not.\n    No matter what hand you use.\n    returns 1 if thumb is up else 0'
    count = 0
    t_x = lmList[4][1]
    p_x = lmList[17][1]
    if (t_x > p_x):
        if (lmList[4][1] >= lmList[2][1]):
            count += 1
    elif (lmList[4][1] <= lmList[2][1]):
        count += 1
    return count
Checks whether your thumb is up or not.
No matter what hand you use.
returns 1 if thumb is up else 0
def thumbIncrementCheck(lmList: list[list[int]]) -> int:
    'Checks whether your thumb is up or not.\n    No matter what hand you use.\n    returns 1 if thumb is up else 0'
    count = 0
    t_x = lmList[4][1]
    p_x = lmList[17][1]
    if (t_x > p_x):
        if (lmList[4][1] >= lmList[2][1]):
            count += 1
    elif (lmList[4][1] <= lmList[2][1]):
        count += 1
    return count