• + 0 comments

    I do it like this is it legal?

    Input = int(input())

    for i in range(Input):

    number = input()  
    output = "NO"
    if number.isdigit():
        if len(number) == 10 and number[0] in ['7', '8', '9']:
            output = "YES"
    print(output)