call the function os.environ.get with 2 arguments: string 'PATH' and an empty string, split the result at the os.pathsep, substitute the result for path.
path = os . environ . get ( 'PATH' , '' ) . split ( os . pathsep )