The task:
Write a function named "one_column" that doesn't take any parameters and returns a list. There is a database saved in a file named "example.db" containing a table named "understanding" with columns "carrier", "describe", and "timing" each storing integer values. Return a list containing only the "timing" value of each record in the table.
My code so far:
import sqlite3
conn = sqlite3.connect('example.db')
c = conn.cursor()
conn.commit()
def one_column():
total = c.execute('SELECT timing FROM understanding')
return list(total)
My code is returning
[[30], [63], [63], [7], [62], [79], [1], [54], [20], [45], [93], [45], [38], [30], [84], [64]].
but the expected result is
[30, 63, 63, 7, 62, 79, 1, 54, 20, 45, 93, 45, 38, 30, 84, 64].
How do I get rid of the nested lists?