Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
287 B
2
Indexable
Never
grey = 0
yellow = 1
green = 2


def response(A, G):
    n = len(A)
    result = []
    for j in range(n):
        if A[j] == G[j]:
            result.append(green)
        elif G[j] in A:
            result.append(yellow)
        else:
            result.append(grey)
    return result