title: How to sum a row of values from a text file using Python
body: <p>I have rows of values in a text file which looks like this:</p>
  
  <pre><code>2,3,4,2
  4,5,6,3
  2,3,4,1
  </code></pre>
  
  <p>I want to be able to sum them in rows:</p>
  
  <p>Eg,</p>
  
  <pre><code>row1 = 11
  row2 = 18
  row3 = 10
  </code></pre>
  
  <p>I have tried to add all the lines in a multi dimensional array, however I am having difficulties. I have tried the codes below:</p>
  
  <pre><code>allVotes=[]
  fo=open('Votes.txt','r')
  
  for line in fo:
    line=line.strip()
    parts=line.split(',')
    eachLine=int(line)
    allVotes.append(eachLine)
  print(allVotes)
  </code></pre>
  
  <p>However, each line is not an integer. Any other ways to solve this?</p>