initial creation
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sqlite3
|
||||
|
||||
with sqlite3.connect("../DATA/presidents.db") as s3conn:
|
||||
s3cursor = s3conn.cursor()
|
||||
|
||||
party_query = '''
|
||||
select firstname, lastname
|
||||
from presidents
|
||||
where party = ?
|
||||
''' # <1>
|
||||
|
||||
for party in 'Federalist', 'Whig':
|
||||
print(party)
|
||||
s3cursor.execute(party_query, (party,)) # <2>
|
||||
print(s3cursor.fetchall())
|
||||
print()
|
||||
Reference in New Issue
Block a user