There is a two-dimensional list in which the number of large lists equals the input (n = 3) from the user:
l1=[] n=int(input()) for i in range(n) : l1.append([]) for s in range(1): l1[i].append(0) print(l1) in general: here l1=[[0], [0], [0]] it should be compared with another list (it is already static). For example: [1, 3, 3, 1] but I need not to compare with the list values themselves, but compare with the index. For example, if the first number 1 is equal to the index in the list ( l1 ) at number 1, then you need to add +1 to the value this index.
Input
3 1331 Weekends
2 0 2