6/19 why it does not work please?


#1

Hello !!
i need you, i don't understand why it doesn't work :
plateau = []

for x in range(0,5):
plateau.append(["o"] * 5)

def afficher_plateau(plateau):
for ligne in plateau:
print " ".join(ligne)
print afficher_plateau(plateau)

answer : it seems that you don't display the correct number of element


#3

Hi,

Try your code without printing your function.
Just call it.

Here's mine:

plateau = []
plateau.append(["O"] * 5)

for element in plateau:
plateau = [element] * 5

def afficher_plateau(plateau):
for element in plateau:
print " ".join(element)

afficher_plateau(plateau)

Regards,


#4

That's it! Thank you!