I'm a beginner with python and I tried to solve my problem for many hours, without success.
My Problem: I have an array A with 12 elements an I want to write A to a text file.
A = [1, 2, 3, 4, 5, 6, 101, 102, 103, 104, 105, 106]
The maximum number of columns of the text file is 8. So my new file should look like this:
*Header...
1, 2, 3, 4, 5, 6, 101, 102,
103, 104, 105, 106
I couldn't find a solution where I can specify the max numbers of columns and set the delimiter as ,.
Can you help me with this problem?