Untitled
unknown
plain_text
4 years ago
287 B
7
Indexable
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
Editor is loading...