title: Removing new line symbol from reading from file in Python
body: <p>I've got a question how to add the words to list without that &quot;\n&quot; symbol.</p>
  <p>Having a file where are words e.g.:</p>
  <pre><code>GCC
  GNU
  gcc
  project
  and
  compiler
  Only
  the
  most
  useful
  options
  are
  listed
  here
  </code></pre>
  <p>My code:</p>
  <pre><code>list1=[]
  
  f = open('3700.txt', &quot;r&quot;)
  for line in range(17):
      list1.append(f.readline())
  </code></pre>
  <p>My result:</p>
  <pre><code>['GCC\n', 'GNU\n', 'gcc\n', 'project\n', 'and\n', 'compiler\n', 'Only\n', 'the\n', 'most\n', 'useful\n', 'options\n', 'are\n', 'listed\n', 'here\n']
  </code></pre>