reading from files to read the content of filepass the string 'rinstead of 'wto the open(function then call the readlines(method on the file object to read in the contents of the file lastclose the file by calling the close(method textfile open('hello txt'' 'content textfile readlines(textfile close(the readlines(method returns list of stringsone string for each line of text in the filecontent ['this will be the content of the file \ ''hello world!\ 'if you want to re-read the contents of that fileyou will have to call close(on the file object and re-open it as an alternative to readlines()you can also call the read(methodwhich will return the entire contents of the file as single string valuetextfile open('hello txt'' 'content textfile read(content 'this will be the content of the file \nhello world!\non side noteif you leave out the second parameter to the open(functionpython will assume you mean to open the file in read mode so open('foobar txt'' 'and open('foobar txt'do the exact same thing about the star pusher map file format we need the level text file to be in specific format which characters represent wallsor starsor the player' starting positionif we have the maps for multiple levelshow can we tell when one level' map ends and the next one beginsfortunatelythe map file format we will use is already defined for us there are many sokoban games out there (you can find more at map file format if you download the levels file from open it in text editoryou'll see something like thisstar pusher (sokoban cloneemail questions to the authoral@inventwithpython com