Python open() Function
Open a file and print the content:
Definition and Usage
open() function opens a file, and
returns it as a file object.
Read more about file handling in our chapters about File Handling.
|file||The path and name of the file|
|mode||A string, define which mode you want to open the file in:
In addition you can specify if the file should be handled as binary or text mode
Learn how to open files in our Read Files Tutorial
Learn how to write/create files in our Write/Create Files Tutorial
Learn how to delete files in our Delete Files Tutorial