Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/313.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 没有错误,但未获得预期的输出_Python_Sqlite_Tkinter - Fatal编程技术网

Python 没有错误,但未获得预期的输出

Python 没有错误,但未获得预期的输出,python,sqlite,tkinter,Python,Sqlite,Tkinter,程序将返回一个列表/元组,每行中都有列名和相应的值。但问题是,当我打印它时,我会看到如下内容: import sqlite3 class DBConnect(): def __init__(self): self.db=sqlite3.connect("Registrations.db") self.db.row_factory=sqlite3.Row self.db.execute("create table

程序将返回一个列表/元组,每行中都有列名和相应的值。但问题是,当我打印它时,我会看到如下内容:

import sqlite3
class DBConnect():
    def __init__(self):
        self.db=sqlite3.connect("Registrations.db")
        self.db.row_factory=sqlite3.Row
        self.db.execute("create table if not exists Ticket(ID integer Primary key autoincrement,name 
text,gender text,comment text)")
        self.db.commit()
    def Add(self,Name,gender,comment):
        self.db.row_factory=sqlite3.Row
        self.db.execute("insert into Ticket(name,gender,comment) values(?,?,?)",(Name,gender,comment))
        self.db.commit()
        return "DATA ADDED SUCCESFULLY"
    def Show(self):
        cursor=self.db.execute("select * from Ticket")
        print(type(cursor))
        return cursor.fetchall()
[,,,,,]
并没有错误,但从表中选择数据将返回其地址。我如何解决这个问题

[<sqlite3.Row object at 0x000002C0748D6D50>, <sqlite3.Row object at 0x000002C0748D68F0>, <sqlite3.Row 
object at 0x000002C0748D6C50>, <sqlite3.Row object at 0x000002C0748D6D10>, <sqlite3.Row object at 
0x000002C0748D6890>, <sqlite3.Row object at 0x000002C0748D6D90>, <sqlite3.Row object at 
0x000002C0748D6870>, <sqlite3.Row object at 0x000002C0748D6750>, <sqlite3.Row object at 
0x000002C0748D6910>, <sqlite3.Row object at 0x000002C0748D6A70>]