(self)
Read lyrics from file into self.lyrics - a 2D list of dimensions [songs, song_words].
Read lyrics from file into self.lyrics - a 2D list of dimensions [songs, song_words].
Read lyrics from file into self . lyrics - a 2D list of dimensions [ songs song_words ] .
def load_lyrics(self):
        """
        Read lyrics from file into self.lyrics - a 2D list of dimensions [songs, song_words].
        """
        path = self.get_path()
        for fn in os.listdir(path):
            with open(os.path.join(path, fn), 'r') as song:
                song_lyrics = self.clean_string(song.read()).split()
                self.lyrics.append(song_lyrics)
def load_lyrics ( self ) : path = self . get_path ( ) for fn in os . listdir ( path ) : with open ( os . path . join ( path , fn ) , 'r' ) as song : song_lyrics = self . clean_string ( song . read ( ) ) . split ( ) self . lyrics . append ( song_lyrics )