What is the correct fix?
total = 0
for row in rows:
total += row
print("total: " + total)
- Convert it:
"total: " + str(total) - Convert it:
"total: " + int(total) - Change
total = 0tototal = "" - Use
print("total: ", + total)here
A str and an int cannot be concatenated; convert the number with str().
Play Problem Solving ▸