I'm new to Python, I apologize if the question is simple. I have a string called decShow with this informartion:
00:00:00,000 -> 94 FB
00:00:00,100 -> 94 FA
00:00:00,200 -> 94 F9
00:00:00,300 -> 94 F8
00:00:00,400 -> 94 F7
00:00:00,500 -> 94 F6
00:00:00,600 -> 94 F5
00:00:00,700 -> 94 F4
00:00:00,800 -> 94 F3
00:00:00,900 -> 94 F2
00:00:01,000 -> 94 F1
00:00:01,100 -> 94 20
HH:MM:SS,sss -> Hex Code
I want to modify that string line by line, creating another string like this
00000000: Hex Code
where the zeros are a HEX value resulting from the conversion of each line minutes, seconds and miliseconds to miliseconds in hexadecimal. Maths are not the problem, the problem is the loop. After trying with a for line in decShow
I'm not having the results I expected.
How can I efficiently do that?
EDIT: To clarify.
I have this in a string:
00:00:00,000 -> 94 FB
00:00:00,100 -> 94 FA
00:00:00,200 -> 94 F9
00:00:00,300 -> 94 F8
I want to transform it into this:
00000000: 94 FB
00000064: 94 FA
000000C8: 94 F9
0000012C: 94 F8
I tried a loop under for line in decShow
but it seems it works just for .readlines()