Starting with Python, trying to do a sum inside a for loop and then print the total Outside of the for loop. Have the right indentation in place to do this but still print() returns a Syntax error! Please suggest where is this going wrong.
File “”, line 3
SyntaxError: invalid syntax
for line in open(’/home/values’):
total=total + int(line.replace(’,’,’’))