View Problem

Append to a file

DiskEdit
python
open('test.txt', 'at').write('Hello World!\n')
ExpandDiskEdit
clojure
(with-out-append-writer "output.txt" (println "This is appended to the file"))
ExpandDiskEdit
cpp C++/CLI .NET 2.0
IO::StreamWriter^ stream;

try
{
stream = gcnew IO::StreamWriter("test.txt", true);
stream->WriteLine("This line appended to file!");
}

Submit a new solution for python, clojure, or cpp
There are 14 other solutions in additional languages (csharp, erlang, fantom, fsharp ...)