I'm running a PostGreSQL query and when I print it, this is returned: [{'sum': 117L}]
Here is the code itself:
cursor.execute("SELECT SUM(length) FROM carmileage")
totalLength = cursor.fetchall()
print totalLength
How would I format this into a number without the (what appears to be) surrounding JSON?