diff options
Diffstat (limited to 'Doc/includes/sqlite3/execsql_fetchonerow.py')
-rw-r--r-- | Doc/includes/sqlite3/execsql_fetchonerow.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Doc/includes/sqlite3/execsql_fetchonerow.py b/Doc/includes/sqlite3/execsql_fetchonerow.py index 115bcb5..8044ecf 100644 --- a/Doc/includes/sqlite3/execsql_fetchonerow.py +++ b/Doc/includes/sqlite3/execsql_fetchonerow.py @@ -9,11 +9,9 @@ SELECT = "select name_last, age from people order by age, name_last" # resulting sequences to yield their elements (name_last, age): cur.execute(SELECT) for (name_last, age) in cur: - print('%s is %d years old.' % (name_last, age)) + print '%s is %d years old.' % (name_last, age) # 2. Equivalently: cur.execute(SELECT) for row in cur: - print('%s is %d years old.' % (row[0], row[1])) - -con.close() + print '%s is %d years old.' % (row[0], row[1]) |