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

Multi tool use


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:
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)
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