I have a file named k_hex which contains the below data. I read the data from file by using below command, and I want to save the data into a list.
hex_data = open('k_hex','r').read()
print hex_data
@0
45
4C
4C
41
00
07
00
00
10
I want my data in below format. How can I get it, I'm new to Python.
hex_data = [0x@0, 0x45, 0x4C, 0x4C, 0X41, 0x00, 0x07, 0x00, 0x00, 0x10]
Can you anyone please do let me know how to achieve the 2nd part?
Thanks.