title: Elaborate data from txt file in Python to obtain a dataset
body: <p>I haven't found questions similar to mine because I have a strange txt file. here an abstract:</p>
  
  <pre><code>'Artist','Album','Title','lyrics','origin','genre','year active'
  ['A1_(group)', 'album: "Here We Come" (1999)', 'Forever In Love', "\n\r\nLove leads to laughter\r\nLove leads to pain\r\nWith you by my side\r\nI feel good times again\n\r\nNever have I felt these feelings before\r\nYou showed me the world\r\nHow could I ask for more\n\r\nAnd although there's confusion\r\nWe'll find a solution to keep my heart close to you\n\r\nAnd I know, yes I know\r\nIf you hold me, believe me\r\nI'll never, never ever leave\n\r\nAnd I know\r\nThere is nothing that I would not do for you\r\nForever be true\r\nAnd I know\r\nAlthough times can be hard\r\nWe will see it through\r\nI'm forever in love with you\n\r\nShow me affection\r\nIn all different ways\r\nGive you my heart\r\nFor the rest of my days\n\r\nWith you all my troubles are left far behind \r\nLike heaven on earth\r\nWhen I look in your eyes\n\r\nAnd although there's confusion\r\nWe'll find a solution\r\nTo keep my heart close to you\n\r\nAnd I know, yes I know\r\nIf you hold me, believe me\r\nI'll never, never ever leave\n\r\nAnd I know\r\nThere is nothing that I would not do for you\r\nForever be true\r\nAnd I know\r\nAlthough times can be hard\r\nWe will see it through\r\nI'm forever in love with you\n\r\nNo need to cry\r\nI'll be right by your side\r\n(Right by your side)\n\r\nLet's take our time\r\nLove won't run dry\r\nIf you hold me, believe me\r\nI'll never, never ever leave\n\r\nAnd I know\r\nThere is nothing that I would not do for you\r\nForever be true\r\nAnd I know\r\nAlthough times can be hard\r\nWe will see it through\r\nI'm forever in love\r\nAnd I know\r\nThere is nothing that I would not do for you\n\r\nForever be true\r\nAnd I know\n\r\nOh I know\r\nAlthough times can be hard\r\nWe will see it through\r\nI'm forever in love with you\n", 'London, United KingdomOslo, Norway', [], '1998–2002, 2009–present']
  ['A1_(group)', 'album: "Here We Come" (1999)', 'Be The First To Believe', "\n\n[INTRO-HOOK]\n\n[ALL:] JUST ONE ON ONE!\r\nTHAT'S THE WAY WE DO IT (BABY) [x 2]\n\n[BEN:] BABY, I CAN'T ALWAYS SAY WHAT'S ON MY MIND, YEAH NEW SENSATIONS\n\n[ALL:] GOT ME\n\r\nMARK: BREAKING OUT THE LOVE I FEEL INSIDE\r\nYEAH, I'LL TAKE YOU TO A WONDERLAND\n\n[BRIDGE]\n\n[ALL:] YOU HIT ME RIGHT BETWEEN THE EYES\r\nI SHOULDA LISTEN TO MA MAMMA DONE TOLD ME\r\nYOU SENT ME SOARING TO THE SKIES\r\nAIN'T GONNA LISTEN TO MA MAMMA DONE TOLD ME\n\n[CHORUS]\n\n[ALL:] GIRL, THIS PARADISE IS OURS\r\nTHE PLANET MOON AND STARS\r\nBELIEVE IN ME BABY\n\n[MARK:] (YOU'VE GOT TO BELIEVE)\n\n[ALL:] BELIEVE IN ME BABY\n\n[BEN:] BE THE FIRST TO BELIEVE\n\n[VERSE]\n\n[CHRISTIAN:] BABY, ELEVATE OUR LOVE INTO THE SKIES\r\nYEAH, COOL VIBRATIONS\n\n[ALL:] ROCK ME\n\n[PAUL:] FLY ME UP TO HEAVEN IN YOUR EYES\r\nYEAH, ITS MAGIC WHEN YOU HYPNOTISE\n\n[ALL:] REPEAT BRIDGE\r\nYOU HIT ME RIGHT BETWEEN THE EYES!!..\n\n[CHORUS]\n\n[ALL:] GIRL, THIS PARADISE IS OURS\r\nTHE PLANET MOON AND STARS\r\nBELIEVE IN ME BABY\n\n[PAUL:] (YEAH, YOU GOT TO BELIEVE)\n\n[ALL:] BELIEVE IN ME BABY\n\n[CHRISTIAN:] (BE THE FIRST TO BELIEVE)\n\n[ALL:] BELIEVE IN ME BABY\n\n[MARK:] (YOU'VE GOT TO BELIEVE)\n\n[ALL:] BELIEVE IN ME BABY\n\n[BEN:] (SAID, BE THE FIRST TO BELIEVE)\n\n[MUSICAL BREAK FOR FOUR BARS]\n\n[ALL:] JUST ONE ON ONE!\r\nTHAT'S THE WAY WE DO IT (BABY)\r\nJUST ONE ON ONE!\r\nTHAT'S THE WAY WE DO IT [x2]\n\n[CHORUS]\n\n[ALL:] GIRL, THIS PARADISE IS OURS\r\nTHE PLANET MOON AND STARS\r\nBELIEVE IN ME BABY\r\nJUST ONE ON ONE!.\n[CHORUS &amp; HOOK SUNG TOGETHER OVERLAPPING]\n\n[ALL:] BELIEVE IN ME BABY\n\n[ALL:] JUST ONE ON ONE, OOOOH\r\nJUST ONE ON ONE, OOOOH [x2]\n\n[ALL]: BELIEVE IN ME BABY\n", 'London, United KingdomOslo, Norway', [], '1998–2002, 2009–present']
  ['A1_(group)', 'album: "Here We Come" (1999)', 'Summertime Of Our Lives', "\n\n[ALL:] SUMMERTIME OF OUR LIVES\r\nSUMMERTIME OF OUR LIVES, OUR LIVES\n\n[BEN:] HEY GIRL THE FEELING IS RIGHT\r\nYOU'VE GOTTA GET OUT IN THE SUNLIGHT\n\n[ALL:] (SUNLIGHT)\n\n[MARK:] HOT SAND HOLDING YOUR HAND\r\nYOU KEEP ME JAMMIN' IN THE MORNING\r\n'TIL THE MOONLIGHT\n\n[ALL:] WE'LL HAVE THE TIME OF OUR LIVES\r\nIN OUR WONDERWORLD\r\nTIME OF OUR LIVES\r\nTHERE'S A BOY FOR EVERY GIRL COME ONE\r\nSUMMERTIME OF OUR LIVES OUR LIVES\r\nSUMMERTIME OF OUR LIVES OUR LIVES\n\n[CHRISTIAN:] COOL BREEZE KISSIN' THE SEA\r\nI'VE GOT A SUNBEAM SHINING ON ME\n\n[ALL:] (ON ME)\n\n[PAUL:] BLUE SKIES SEA IN YOUR EYES\r\nLET THE GROOVE MOVE MY PEOPLE\r\nALL AROUND ME\n\n[ALL:] WE'LL HAVE THE TIME OF OUR LIVES\r\nIN OUR WONDERWORLD\r\nTIME OF OUR LIVES\r\nTHERE'S A BOY FOR EVERY GIRL COME ON\r\nSUMMERTIME OF OUR LIVES OUR LIVES\r\nSUMMERTIME OF OUR LIVES OUR LIVES\n\r\nSUMMERTIME SUMMERTIME\r\nSUGAR CANDY CHERRY WORLD\r\nSUMMERTIME SUMMERTIME\r\nTHERE'S A BOY FOR EVERY GIRL\r\nSUMMERTIME SUMMERTIME\r\nSUGAR CANDY CHERRY WORLD\r\nSUMMERTIME SUMMERTIME\n\r\nSUMMERTIME SUMMERTIME[ X 2]\r\nSUMMERTIME SUMMERTIME[ X 2]\n\r\nWE'LL HAVE THE TIME OF OUR LIVES\r\nIN OUR WONDERWORLD\r\nTIME OF OUR LIVES COME ONE\r\nSUMMERTIME OF OUR LIVES OUR LIVES (COME ON)\r\nSUMMERTIME OF OUR LIVES OUR LIVES (COME ON)\n\r\nBABY GET READY GET DOWN\r\nARE YOU UP FOR IT GET DOWN WITH IT\r\nBABY GET READY GET DOWN\r\nARE YOU UP FOR IT GET DOWN WITH IT\r\n(COME ON)\r\nBABY GET READY GET DOWN\r\nARE YOU UP FOR IT GET DOWN WITH IT\r\nBABY GET READY GET DOWN DOWN DOWN\r\n(COME ON)\r\nSUMMERTIME OF OUR LIVES OUR LIVES\r\nSUMMERTIME OF OUR LIVES OUR LIVES\r\n(COME ON)\n", 'London, United KingdomOslo, Norway', [], '1998–2002, 2009–present']
  ['A1_(group)', 'album: "Here We Come" (1999)', 'Ready Or Not', "\n\n[CHRISTIAN:] COULD YOU LOVE A BOY\r\nLIKE ME TONITE,\r\nCOME ON BABY WON'T YOU\r\nTAKE A BITE\r\nCOULD YOU LOVE A BOY LIKE ME TONITE\r\nOH YEAH!\n\n[BEN:] THERE'S MAGIC WITHIN YOU,\r\nTHERE'S MAGIC IN EVERYTHING YOU DO,\r\nMAGIC ME TO THE PLACE WHERE\r\nDREAMS COME TRUE.\n\n[CHRISTIAN:] SOMETIMES I GO CRAZY\r\nI GET OFF ON THE CRAZY THINGS YOU DO,\r\nI'M JEALOUS OF EVERY GUY THAT\r\nLOOKS AT YOU\n\n[MARK:] SO TELL ME,\r\nCOULD YOU LOVE A BOY LIKE ME LIKE ME\r\nTELL ME COULD YOU LOVE A BOY LIKE ME.\n\n[BEN:] BECAUSE I NEED YOU,\r\nYOU'RE MY HEART AND SOUL.\r\nAND I'M GONNA LET YOU KNOW\r\nAIN'T GONNA LET YOU GO.\n\n[ALL:] READY OR NOT, HERE I COME, \r\nYOU CAN'T HIDE FROM ME, HIDE AND SEEK.\r\nRUN AWAY NOW, OR STAY NOW.\r\nCOS I'LL KEEP SEARCHING\r\nI'LL KEEP SEARCHING FOR LOVE.\n\n[CHRISTAN:] COULD YOU LOVE A BOY LIKE ME TONITE,\r\nCOME ON BABY WON'T YOU TAKE A BITE,\n\n[PAUL:] THE GAME THAT YOU'RE PLAYING\r\nWHY DO YOU TEASE ME LIKE YOU DO\r\nYOU GOTTA LET ME DOWN\r\nOR SEE IT THROUGH.\n\n[MARK:] YOU'RE STRAIGHT FROM A MOVIE,\r\nBUT BABY I'M NOT FROM HOLLYWOOD.\r\nBY STEALING YOUR HEART\r\nI'LL BE YOUR ROBIN HOOD.\n\n[CHRISTIAN:] TELL ME, COULD YOU LOVE A BOY LIKE ME LIKE ME\r\nTELL ME COULD YOU LOVE A BOY LIKE ME.\n\n[CHRISTIAN:] BECAUSE I NEED YOU,\r\nYOU'RE MY HEART AND SOUL.\r\nAND I'M GONNA LET YOU KNOW\n\n[MARK:] AIN'T GONNA LET YOU GO.\n[ALL:] READY OR NOT, HERE I COME,\r\nYOU CAN'T HIDE FROM ME, HIDE AND SEEK.\r\nRUN AWAY NOW, OR STAY NOW.\r\nCOS I'LL KEEP SEARCHING\r\nI'LL KEEP SEARCHING BABY\n\n[ALL:] READY OR NOT, HERE I COME,\r\nYOU CAN'T HIDE FROM ME, HIDE AND SEEK.\r\nRUN AWAY NOW, OR STAY NOW.\r\nCOS I'LL KEEP SEARCHING\r\nI'LL KEEP SEARCHING FOR LOVE.\n\n[ALL:] BABY - YOU CAN'T HIDE THE LOVE INSIDE\r\nSEARCHING FOR LOVE\r\nBABY - YOU CAN'T HIDE THE LOVE INSIDE\n\n[MARK:] COULD YOU LOVE A BOY LIKE ME, LIKE ME\r\nTELL ME COULD YOU LOVE A BOY LIKE ME.\n\n[BEN:] BECAUSE I NEED YOU,\r\nYOU'RE MY HEART AND SOUL\r\nAND I'M GONNA LET YOU KNOW\n\n[PAUL:] I'LL NEVER LET YOU GO! OH NO!\n\n[ALL:] READY OR NOT, HERE I COME,\r\nYOU CAN'T HIDE FROM ME, HIDE AND SEEK.\r\nRUN AWAY NOW, OR STAY NOW.\r\nCOS I'LL KEEP SEARCHING\r\nI'LL KEEP SEARCHING BABY\n\n[ALL:] READY OR NOT, HERE I COME,\r\nYOU CAN'T HIDE FROM ME, HIDE AND SEEK.\r\nRUN AWAY NOW, OR STAY NOW.\r\nCOS I'LL KEEP SEARCHING\r\nI'LL KEEP SEARCHING FOR LOVE.\n\n[CHRISTIAN:] COULD YOU LOVE A BOY\r\nLIKE ME TONITE,\r\nCOME ON BABY WON'T YOU\r\nTAKE A BITE\r\nCOULD YOU LOVE A BOY LIKE ME TONITE\r\nOH YEAH\n", 'London, United KingdomOslo, Norway', [], '1998–2002, 2009–present']
  </code></pre>
  
  <p>and here I've obtained the function that creates the file.</p>
  
  <pre><code>input_row = [artista, key, val[0], val[1], altre_info[0], altre_info[1], altre_info[2]]
  #print(input_row)
  with open('datartist.txt','a+') as file:
       file.write(str(input_row)+'\n')
  </code></pre>
  
  <p>Basically I want to obtain a Dataset ( I added the column names to the file). but I'm not sure if I have to use <code>readlines()</code> or a loop over <code>readline()</code>, or I don't know what..</p>
  
  <p>thank you so much guys</p>