I have a problem with arguments in a function. I am trying to made a grid but there are 2 diferenten grids for 2 people. So im trying to make so when i write prikazgrida(p1)
it will write me p1 list but when i write prikazgrida(p2)
it will write the grid for the second guy. The main problem is that i dont know how to replace the “p1” in this line of code for i in p1[šts]:
i have tried to do it with {} but didnt work.
x=""
šts=0
štr=0
print(" 0 1 2 3 4 5 6 7")
while šts < 8:
for i in p1[šts]:
if i == "0":
x+="O "
elif i == "1":
x+="L "
else:
x+="Z "
print(štr,x)
x=""
štr +=1
šts +=1
prikazgrida(p1)```
New contributor
Killerp1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.