Avatar ·

How to remove the symbol of the new line (\ n) when reading the lines from the file

📁 python, ии

when using File.Readlines () we get something like this:

   & gt; & gt; & gt;  file.readlines ()  [ '12 \ n' ,  '10 \ n' ,  '' 9 \ n ',  '' 15 \ n ', ' '10 \ n' ,  '120' ]     

how to remove \ n ?