more with lists one more example suppose we have list whose elements are lists of size like belowl [[ , ][ , ][ , ]if we want to flip the order of the entries in the listswe can use the following list comprehensionm [[ ,xfor , in [[ ][ ][ ]note you can certainly get away without using list comprehensionsbut once you get the hang of themyou'll find they are both quicker to write and easier to read than the longer ways of creating lists two-dimensional lists there are number of common things that can be represented by two-dimensional listslike tictac-toe board or the pixels on computer screen in pythonone way to create two-dimensional list is to create list whose items are themselves lists here is an examplel [[ , , ][ , , ][ , , ]indexing we use two indices to access individual items to get the entry in row rcolumn cuse the followingl[ ][cprinting two-dimensional list to print two-dimensional listyou can use nested for loops the following example prints listfor in range( )for in range( )print( [ ][ ]end="print(another option is to use the pprint function of the pprint module this function is used to "pretty-printits argument here is an example to print list lfrom pprint import pprint pprint(lthe pprint function can be used to nicely print ordinary lists and other objects in python working with two-dimensional lists nested for loopslike the ones used in printing twodimensional listcan also be used to process the items in two-dimensional list here is an example that counts how many entries in list are even