How to link "bytes getBytes()" in Java and "bytearray()" in python?

Hello
I was looking for an equivalent for byte[] getBytes() in Python
I understand that this is a bytearray, but getBytes() gives bytes like this:
[B@1ce59895 (i.e. 0x1ce59895???), a bytearray - 115 114 95 115 104 97 104
How is it linked?
July 9th 19 at 13:30
2 answers
July 9th 19 at 13:32
String str = new String("some string");
byte[] bStr = str.getBytes();

"Beautiful," is print
System.out.write(bStr);
or
System.out.println(Arrays.toString(bStr));
Better new String(bStr) - charity84 commented on July 9th 19 at 13:35
July 9th 19 at 13:34
The question is unclear.
What You want to communicate exactly?
From Python to transfer the bytes in Java?
or to read the bytes in Java just like in Python?
or to read the bytes in Python as in Java?
Where to read the bytes themselves?
As the bytes NEED to submit for your goals?

Find more questions by tags JavaProgramming languagesPython