IO/Files

General information
Files are a basic data structure used in every programming language. In Python handling Files is especially easy.

Open Files
To open files we use the open-command:

Closing files
To close files, we use (well, what else) the close-command:

Writing information
To write information to a file, we use the write-command:

Note that with the write-command, we can only write Strings to a file, for writing more complicated structures, please check out the Pickle module.

Reading informations
Like the write-command, there exists the read-command:

Access-mode
There are several different access-modes: