得到sqlite的数据条数的代码
https://blog.csdn.net/weixin_35754962/article/details/129060944
import sqlite3 conn = sqlite3.connect('example.db') cursor = conn.cursor() # 查询数据条数 cursor.execute("SELECT COUNT(*) FROM table_name") count = cursor.fetchone()[0] print(count) conn.close()