title: TypeError: bad operand type for unary +: 'str' to a list
body: <p>here is my list that I made:</p>
  
  <pre><code>nums= []
  for n in range(10):
      thenums= random.randint(10,90)
      print(thenums, end= " ")
      nums.append(thenums)
  </code></pre>
  
  <p>and now I need help writing each integer separately, but I am having an issue writing each number from the list on an individual line on a file.</p>
  
  <pre><code>with open("angles.txt", 'w') as h:
      for n in nums:
          h.write[str(n), + '\n'] 
  </code></pre>