def Display(self):
# current is assign head value
current = self.head
# if head is empty it excute this statment of empty list
if self.head is None:
print("--------- Sorry it's an Empty List ---------")
return
print(
"--------------- ALL Account HOlder List ---------------\n Account_No | Name | "
"Contact_No | Type | Amount| Password")
# if list is not none it excute thst statment and show the attribute of account
while current is not None:
print(" ", current.number, " ", current.name, " ", current.contact,
" ", current.type, " ", current.amount, " ", current.password)
cur.execute("SELECT id, name, contact, type, amount, password FROM customer ")
conn.commit()
current = current.next
这个方法并没有显示任何内容,但当我在控制台中运行这个查询时,它会显示表中的所有值。即使我关闭程序并再次运行,当我运行显示功能时,它也不会显示任何内容
目前没有回答
相关问题 更多 >
编程相关推荐