Hello I am learning PYTHON and was learning about string splitting .so I have a hex string named
A="aca80202"
I want to convert it into a list of 2 characters
B=["ac","a8","02",02"]
is there any way to do it?
Hello I am learning PYTHON and was learning about string splitting .so I have a hex string named
A="aca80202"
I want to convert it into a list of 2 characters
B=["ac","a8","02",02"]
is there any way to do it?
If you are starting with Python you could do it in a simple way using a for
loop:
A="aca80202"
B = []
for i in range(0, len(A), 2):
B.append(A[i:i+2])
EDIT: you could see more ways to do it here.