Make a List


It prints out way too many 'O's'

Oops, try again. It looks like you do not have 5 rows in your list.

I just want it to print out a row of 5

board = ['O, O, O, O, O'];
for i in range(0,5):
    print board


Make your board empty (board=[]). It is because you are going to append the 5 rows onto it. If your board is like what you have now, you have an extra row (that isn't a nested list like the rest).

Keep in mind that you don't really need the ; because this is Python, not Javascript (although having it there will not affect what you're trying to do).


Gotcha mate thanks so much I'll try it out


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.