line is simple import statement that imports the pygame and sys modules so that our program can use the functions in them all of the pygame functions dealing with graphicssoundand other features that pygame provides are in the pygame module note that when you import the pygame module you automatically import all the modules that are in the pygame module as wellsuch as pygame images and pygame mixer music there' no need to import these modules-inside-modules with additional import statements from pygame locals import line is also an import statement howeverinstead of the import modulename formatit uses the from modulename import format normally if you want to call function that is in moduleyou must use the modulename functionname(format after importing the module howeverwith from modulename import you can skip the modulename portion and simply use functionname((just like python' built-in functionsthe reason we use this form of import statement for pygame locals is because pygame locals contains several constant variables that are easy to identify as being in the pygame locals module without pygame locals in front of them for all other modulesyou generally want to use the regular import modulename format (there is more information about why you want to do this at pygame init(line is the pygame init(function callwhich always needs to be called after importing the pygame module and before calling any other pygame function you don' need to know what this function doesyou just need to know that it needs to be called first in order for many pygame functions to work if you ever see an error message like pygame errorfont not initializedcheck to see if you forgot to call pygame init(at the start of your program displaysurf pygame display set_mode(( )line is call to the pygame display set_mode(functionwhich returns the pygame surface object for the window (surface objects are described later in this notice that we pass tuple value of two integers to the function( this tuple tells the set_mode(function how wide and how high to make the window in pixels ( will make window with width of pixels and height of pixels