Receiving data from HC-06 problem

Hello I would like to interface the Arduino with a Python program via Bluetooth. The data is transmitted to my computer but the data is not what I expected. Posted below are the source codes.

Arduino Code:

int ledPin = 13;
int state = 0;
int flag = 0;

void setup(){
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW);
  Serial.begin(9600);
}

void loop(){
  if(Serial.available()>0) {
    state = Serial.read();
  }

  if(state == '1') {
    Serial.println("TEST");
    delay(1000);
  }
}

Python with PyBluez Code:

import bluetooth

bd_addr = "21:14:10:05:16:32"

port = 1

sock = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
sock.connect((bd_addr, port))

sock.send("1")

while(True):
    data = sock.recv(4096)

    print(data)

sock.close()

Data received on Python:

b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'
b'T'
b'EST\r\n'

As you can see it also includes b' and the end line characters in the transmission. What I expected was:

Test
Test
Test

How would I achieve this? Thank you for your help.

Please any advise would greatly be appreciated. Thank you.

The b'' stuff is added by Python to show that you are dealing with binary data. Try:

print (str (data))

To also remove CR+LF:

print (str (data).rstrip())