Encode The Elements Of A Tuple
i have this code which returns the values of a database using a tuple # Create a new connection con=connection() #create a cursor to the connection cur=con.cursor()
Solution 1:
You could use map()
function. Try
return map( lambda x: (x[0].encode("utf-8"),)+x[1:], row )
Post a Comment for "Encode The Elements Of A Tuple"