3 | Make a List: List Comprehension


#1



I found a way to complete the task in one line:


board = [["O"] * 5 for i in range(5)]

:grinning:


#2

That was helpful. If weren't for this post I would have no idea what to do. Thanks:smiley:


#3

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