Help me in solving AO01C problem

My issue

As a new programmer I do not understand what is the purpose of N in line 3. N was never used in the code and when I try to remove this from code and also removed value of N from custom inputs I get an error

error I got after removing N
Traceback (most recent call last): File "/mnt/", line 10, in <module> index = A.index(X) ValueError: <map object at 0x1460d089cbb0> is not in list

My code

# Update the blanks below to solve the problem

t = int(input())
for i in range(t):
    N, X = map(int, input().split())
    A = list(map(int, input().split()))
    #variable to store the count of X
    occurrence = A.count(X)
    #variable to store the position / index of X
    index = A.index(X)
    print(occurrence, index)

Learning course: Python for problem solving - 2
Problem Link: CodeChef: Practical coding for everyone

The Python implementation for this problem does not require N. However, in other programming languages such as C++, knowing the size of the array (in this case its a list) A is required. Hence the problem provided it, although this is a Python course so Iā€™m not sure if it is necessary. Removing line 3 removes X, which is important for the program and also causes problems with what A is (the input that was supposed to be N and X is now assigned to A and the real input for A is never acquired). If you really wanted to, you could change the line to: _, X = map(int, input().split()). The ā€œ_ā€ is a way of showing that a variable is not important.