with open('testDat.txt') as f:
  lines = f.readlines()

with open('testDat_format.txt', 'w') as f:
  for line in lines:
   if line.endswith('/\n'):
     data = []
  for i in range(0, len(line)-2, 3):
    data.append(line[i+2:i+4])
    f.write(',' .join(['0x{0:0>2}'.format(d) for d in data]) + '\n')
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence