## Want to keep learning?

This content is taken from the Partnership for Advanced Computing in Europe (PRACE)'s online course, Python in High Performance Computing. Join the course to learn more.
2.15

# Hands-on: Input and output

In this exercise we study how to read and write arrays to disk.

Source code for this exercise is located in numpy/input-output/

File numpy/input-output/xy-coordinates.dat contains a list of (x,y) value pairs. Read the data with numpy.loadtxt(). Add then 2.5 to all y values and write the new data into a file using numpy.savetxt().