I am trying to return something like 'GBP' in Python after running a fetch query from a SQLite database, but I am getting ('GBP',) instead. I know this question has been asked before but I am very new to Python and didn't understand any of the answers I read. Could someone please help?
a = input("Enter ID of customer: ")
currency1 = """SELECT Currency FROM Customers WHERE ID='{}'""".format(a)
cur.execute(currency1)
result1 = cur.fetchone()
a3 = tuple(result1)
print(a3)
It has to be a tuple or a string because it has to be hashable. I know there's likely an easy fix but I can't seem to get it. The comma in the return is stopping me from moving on to the next stage. Thanks!