int object is not iterable i cant see the mistake [on hold]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


int object is not iterable i cant see the mistake [on hold]



this is a part of the code for i tic tac tie game i am programming but it has a problem with the vertwin+=map[k][k] if you need to see the full code tell me


vertwin+=map[k][k]


def wincond():
def winpri(list):
if list==['x','x','x']:
print('x wins')
t=0
elif list==['o','o','o']:
print('o wins')
t=0
for j in range(3):
vertwin=
sidewam=
winpri(map[i])
backside=
for k in range(3):
vertwin+=map[k][k]
sidewam+=map[k][j]
backside+=map[k][k-k*2]
winpri(vertwin)
winpri(sidewin)
winpri(backside)



This question appears to be off-topic. The users who voted to close gave this specific reason:





We need to see the full traceback and have enough information to reproduce the problem. We don't know what map is here, for example.
– Martijn Pieters
yesterday


map





Most likely however, map[k][k] is a single integer. You can't use listobject += integer, you'd want to use listobject.append(integer) instead.
– Martijn Pieters
yesterday


map[k][k]


listobject += integer


listobject.append(integer)




Popular posts from this blog

How to scale/resize CVPixelBufferRef in objective C, iOS

Stripe::AuthenticationError No API key provided. Set your API key using “Stripe.api_key = ”

SVG with two text elements. When one resizes due to textLength - how to resize the other one to the same character size