我正在尝试从 SQL SELECT 查询中获取随机行:
SQL = 'SELECT * FROM tblQuestion'
cursor = Databaseconnector.SELECT(SQL)
rows = cursor.fetchall()
rand = random.random(0,10)
pprint.pprint(rows)
row = rows(rand)
但是,它抱怨说:
Type Error: List object is not callable
在最后一行