I have question, which couldn't found clear answers. I am using Python and importing database from MS Access.I search for some data in database and display it on my GUI, if the data is not present, it should skip or it should print None as shows in below picture. Now i have a problem that, some how able to print in GUI, but getting unicode bracket or 'u' character at beginning. How can i remove it. GUI
My code is as below: Using some empty array to hold the database data and code is my data
DTC_Description = []
connection = pypyodbc.connect('DRIVER={Microsoft Access Driver (*.mdb)};UID=admin;UserCommitSync=Yes;SafeTransactions=0;MaxScanRows=8;MaxBufferSize=2048;FIL={MS Access};DriverId=25;DefaultDir=C:\PYTHON27;DBQ=C:\PYTHON27\iso14229dtcs.mdb;')
cursor1 = connection.cursor()
cursor1.execute("SELECT Field2 FROM DTC_CODES Where Field1 = '{}'".format(code))
# Here it will print
row = cursor1.fetchone()
if row:
r1 = row[0]
print r1
DTC_Description.append(row)