Files
S4-P3-Projet/utils/savetofile.py
Marc-Antoine Lafreniere fffc76ce2e #19 - Reformat pbm file
Convert pbm file to csv with right height and width
2019-01-23 14:13:55 -05:00

11 lines
201 B
Python

"""
Save a two dimension array in a file
"""
def matrixToFile(matrix, fileName):
with open(fileName, 'w') as f:
for x in matrix:
for y in x:
f.write('%s ' % y )
f.write('\n')