Мне нужна моя игра, чтобы запустить это:
def w_win(l,l2,check):
line = l
line2 = l2
for x in range(4):
if line[x] == line2[x]:
if len(str(check+check)) == 1:
line[x] = " "+str(check+check)+" "
if len(str(check+check)) == 2:
line[x] = " "+str(check+check)+""
if len(str(check+check)) == 3:
line[x] = " "+str(check+check)
if len(str(check+check)) == 4:
line[x] = str(check+check)
, но потом я получаю это:
if line[x] == line2[x]:
TypeError: 'NoneType' object has no attribute '__getitem__'
, и я звоню с
for p in range(2,1025):
first = w_win([" ","2","16"," "],[" ","2"," ","32"],p)
любая помощь?