Skip to content

Instantly share code, notes, and snippets.

@serian
Created February 2, 2011 17:25
Show Gist options
  • Save serian/808028 to your computer and use it in GitHub Desktop.
Save serian/808028 to your computer and use it in GitHub Desktop.
python db sqlite3
csr = self.conn.cursor()
csr.execute(SQL_GET_TAG)
tags = {}
for tag in csr:
one = tag[0]
if not one in tags:
tags[one] = 1
else:
tags[one] += 1
@serian
Copy link
Author

serian commented Feb 2, 2011

カラム一つでも、タプルに入って返ってくる

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment