How to save solution in .txt format?

See for instance: How to get the solution obatained by fenics as a vector? - #7 by dokken