晚上,我使用以下代码从数据库中检索数据以进行编辑
os.system('cls')
print("Editing the details")
conn = sqlite3.connect('SADS.db')
cur = conn.cursor()
print " "
choice = raw_input("Does the Customer know their user ID? Y/N : ")
if choice == "N":
number = raw_input("What is their phone number? : ")
cur.execute("SELECT * FROM customers")
while True:
rows = cur.fetchone()
if rows == None:
print "No one found with that record"
break
print rows
raw_input("Press Enter to return to the menu")
os.system('cls')
但是当我这样做时,我会返回以下结果:
(u'0001', u'Stack', u'Overflow', u'Confused', u'', u'sqlite', u'PYTH OON', u'07831994131', u'TEST@hotmail.com')
哦 ps 那些不是我为了我的安全编辑它们的真实细节:')
但无论如何,我如何删除每条数据之前的 u ?
非常感谢。