Hello, I'm new with Python and running into an error trying to print data I have retrieved from a database. The code works but there are characters being printed with it that are not displayed in the database...here is my current code:
con = mysql.connect(host="silo.soic.indiana.edu", port=3306, user="XXXXXXX", passwd="XXXXXX", db="XXXXXXXXX")
cursor = con.cursor()
group = cursor.execute("select name from people_committees where personid='%s';" % govid)
grp = cursor.fetchall()
print(grp[0:])
The code is printing this:
[(b'House Committee on Armed Services',, (b'House Committee on Armed Services',), (b'House Committee on Armed Services',), (b'House Committee on Oversight and Government Reform',), (b'House Committee on Oversight and Government Reform',)]
However, I want the code to print this:
House Committee on Armed Services, House Committee on Armed Services, etc.....
Any help you could provide me on how to do this is greatly appreaciated!
The character 'b' is not in the database when I execute this statement in mysql and I don't know why it shows on python!