79463213

Date: 2025-02-24 10:40:52
Score: 0.5
Natty:
Report link

Just use numpy.savetxt function. Here I can produce single- and double- column output files:

import numpy as np
L1 = ['a','b','c']
L2 = ['x','y','z']
np.savetxt( 'outputL1.txt', list( zip(L1)), fmt='%s')
np.savetxt( 'outputL1L2.txt', list( zip(L1, L2)), fmt='%s %s')
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ed Gan