Iterator in MySQLdb

curIs a cursor object

python


sql = "SELECT * FROM pokos"
cur.excecute(sql)
for r in iter(cur):
	print r

Can be done with

Recommended Posts

Iterator in MySQLdb
5-1, iterator
Split iterator into chunks in python
Learn the design pattern "Iterator" in Python
Handles UTF-8 Japanese characters in Python's MySQLdb.