I have the following bytearray
in Python:
bytearray(b'\x02\xcb\x00\n\x02\xcb\x00\n\x02\xcb\x00\n\x02\xcb\x00\n')
I want to convert the hexa values of the bytearray
to an array of integer values, by converting \x02\xcb\x00
to an integer 183040 for each '\n'.
It should look like:
[183040, 183040, 183040, 183040]
How can I get it?
I did a list(bytarray)
and it just worked for single values not composite ones.