Please help


board = []
for i in range(0,5):
    board.append('O') * 5


the instructions:

Inside the loop, .append() a list containing 5 "O"s to board

an important word in this sentence is: list

question: Are you appending a list to board?


board = []
for i in range(0,5):
    board.append['O'] * 5

I tried that before and It didn't work. It says 'Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: 'builtin_function_or_method' object has no attribute 'getitem' '


.append() is still a method call, you can't just remove the parentheses from a method call

now it will attempt to access method by index, that won't work


board.append(['O']) * 5. I tried this aswell


programming isn't about trying. Its about understanding.

so now we append a list contain 1 "O" to the board, then append modifies the list and returns None

None * 5 will return an error


thanks. so you have to modify inside the append.(). thanks for the help :slight_smile: