File Handling

File handling in python is very powerful adn versatile tool that can be used to perform a wide range of operations. However, it is important to carefully consider the advantages and disadvantages of file handling when writing programns, to ensure that the code is secure, reliable, and performs well.

Advantages :

Disadvantages :

File Operations Mode :

File Open

At first we need to perform the operation of opening of file, before reading or writing the file. We have a inbuilt function open().

Syntax :

f = open(filename, mode)