PYTHON ASSIGNMENT 9: FILES




Read from console and write to file

Read from file and display in console

Display file content with line number

Display first N lines of a file

Display nth line of a file

Display from nth line to mth line of a file

Copy file

Copy first N lines from a file to new file

Copy from nth line to mth line of a file to new file

Merge two files

Count number of characters, words and lines in a file

Search if a word exists in a file.

Count number of times a word exists in a file

Search if a word exists in a file. Display all lines in which the word exists.

Delete a word in a file

Replace a word in a file

Write a program that creates a dictionary of the frequency of all words in a file. Remove noise words like “the”, “and”, and so on. Display the three most frequently occurring words.

Write a program that creates a dictionary of the frequency of all the characters in a file. Display five most frequently occurring characters.

Given a file containing customer names and their phone numbers, write a program to find the telephone number of a given customer.

Compare two files and print the first line where they differ.




No comments:

Post a Comment

Don't be a silent reader...
Leave your comments...

Anu