0
import sqlite3
conn = sqlite3.connect('boo2.db')
c = conn.cursor()
x=c.execute("SELECT * FROM sqlite_master where type='table'")
for y in x:
print(x)
the output is
********************************
<sqlite3.Cursor object at 0x00272DE0>
Process finished with exit code 0
**************************************
但是沒有任何表格..如何獲取表格名稱?如何在python3上顯示在sqlite數據庫中創建的所有表格
您打印'x'不'y'。將其更改爲'print(y)' – IanAuld
我的錯誤...非常感謝Ian指出 –