I have a string and I'm trying to iterate it in blocks and save the value of each block into a list, but, without success.
string_A = '920dfffffffff27aff024932090901212003024937090901212003024942090901212003024947090901212003'
newFileTtsInHexString = []
finalListFile = []
for element in string_A[0:len(string_A):18]:
newFileTtsInHexString = element
print("\n=== newFileTtsInHexString ==="+newFileTtsInHexString)
finalListFile = '\n'.join(newFileTtsInHexString)
that's the output :
=== newFileTtsInHexString ===9
=== newFileTtsInHexString ===0
=== newFileTtsInHexString ===0
=== newFileTtsInHexString ===0
=== newFileTtsInHexString ===0
But my goal is to have the finalListFile like this:
920dfffffffff27aff
024932090901212003
024937090901212003
024942090901212003
024947090901212003
in blocks of 18 characters.