Class - 12 CBSE Computer Science Important File Handling Questions 2025
Python Data Handling
Write a function to insert a sentence in a text file, assuming that text file is very big and can't fit in computer's memory.
View Answer1 Likes
Python Data Handling
Write a program to read a file 'Story.txt' and create another file, storing an index of 'Story.txt', telling which line of the file each word appears in. If word appears more than once, then index should-show all the line numbers containing the word.
View Answer1 Likes
Python Data Handling
Write a program to accept a filename from the user and display all the lines from the file which contain Python comment character '#'.
View Answer3 Likes
Python Data Handling
Reading a file line by line from the beginning is a common task. What if you want to read a file backward ? This happens when you need to read log files. Write a program to read and display content of file from end to beginning.
View Answer2 Likes
Python Data Handling
Write a Python program to display the size of a file after removing EOL characters, leading and trailing white spaces and blank lines.
View Answer2 Likes
Python Data Handling
Write a function Remove_Lowercase() that accepts two file names, and copies all lines that do not start with lowercase letter from the first file into the second file.
View Answer3 Likes
Python Data Handling
Write a program to display all the records in a file along with line/record number.
View Answer2 Likes
Python Data Handling
Write a method in Python to write multiple line of text contents into a text file "mylife.txt".
View Answer3 Likes
Python Data Handling
Write a program to add two more employees' details (empno, ename, salary, designation) to the file "emp.txt" already stored in disk.
View Answer1 Likes
Python Data Handling
Write code to open the file in the previous question and print it in the following form:
Name : <name> Phone: <phone number>
View Answer3 Likes
Showing 21 - 30 of 59 Questions