data figure valid representation of data set as list of lists (for simplicitywe overlook the fact that the values in the secondary lists are referential to properly initialize two-dimensional listwe must ensure that each cell of the primary list refers to an independent instance of secondary list this can be accomplished through the use of python' list comprehension syntax data [ for in range(rthis command produces valid configurationsimilar to the one shown in figure by using list comprehensionthe expression [ is reevaluated for each pass of the embedded for loop thereforewe get distinct secondary listsas desired (we note that the variable in that command is irrelevantwe simply need for loop that iterates times two-dimensional arrays and positional games many computer gamesbe they strategy gamessimulation gamesor first-person conflict gamesinvolve objects that reside in two-dimensional space software for such positional games need way of representing such two-dimensional "board,and in python the list of lists is natural choice tic-tac-toe as most school children knowtic-tac-toe is game played in three-by-three board two players-- and --alternate in placing their respective marks in the cells of this boardstarting with player if either player succeeds in getting three of his or her marks in rowcolumnor diagonalthen that player wins this is admittedly not sophisticated positional gameand it' not even that much fun to playsince good player can always force tie tic-tac-toe' saving grace is that it is nicesimple example showing how two-dimensional arrays can be used for positional games software for more sophisticated positional gamessuch as checkerschessor the popular simulation gamesare all based on the same approach we illustrate here for using two-dimensional array for tic-tac-toe