0% found this document useful (0 votes)
2 views1 page

Python (IT2121) - File Handling Practice Programs

The document outlines a Python programming course (IT2121) for the 2025-2026 session, focusing on file handling programs. It includes various tasks such as reading files, appending text, counting lines and words, and copying file contents. Each task is designed to enhance understanding of different file operations in Python.

Uploaded by

hawkplays2707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Python (IT2121) - File Handling Practice Programs

The document outlines a Python programming course (IT2121) for the 2025-2026 session, focusing on file handling programs. It includes various tasks such as reading files, appending text, counting lines and words, and copying file contents. Each task is designed to enhance understanding of different file operations in Python.

Uploaded by

hawkplays2707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Python Programming (IT2121)

Session: 2025-2026

Topic: File Handling Programs

1. Understanding different file opening modes.


2. Write a Python program to read an entire text file.
3. Write a Python program to read first n lines of a file
4. Write a Python program to append text to a file and display the
text.
5. Write a Python program to read a file line by line and store it
into a list.
6. Write a Python program to read a file line by line store it into
an array.
7. Write a python program to find the longest word in the file.
8. Write a Python program to count the number of lines, words
and characters in a text file.
9. Write a Python program to count the frequency of words in a
file
10. Write a Python program to copy contents of a file into
another file.

You might also like