0

enter image description here

when i perform query like show databases or show tables it shows outputs in something called byte array. i want the output in normal String form . can someone tell how can i fix this

def tab(x,y):
    x=[]
    mycursor.execute("Show databases")  #Selecting Database
    l=list(mycursor.fetchall())
    print(l)

```````output``

(bytearray(b'capital'),) (bytearray(b'capital_user'),) (bytearray(b'information_schema'),) (bytearray(b'mysql'),) (bytearray(b'performance_schema'),) (bytearray(b'sys'),)

Yash 123
  • 1
  • 1

1 Answers1

0

that is called binary string,, just convert it normally.. here is reference how to convert it How to convert 'binary string' to normal string in Python3?