Skip to content
Advertisement

How to save array (integer) to text file in Python?

I have array of this integer type:

JavaScript

How can I save this to an xyz.txt file in this format with 5 lines:

JavaScript

The following code returns the error

JavaScript
JavaScript

Advertisement

Answer

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement