Python File Programs
Python File Programs
Write a Python code to merge two given file contents into a third file.
Description:
Create a third file EEE_PY_B1.txt and write the data of both files into it.
Filename Data
EEE_PY_B1.txt Every Thursday 10 to 12
EEE_PY_B2.txt Every Tuesday 2 to 4
EEE_PY_Lab.txt Every Thursday 10 to 12
Every Tuesday 2 to 4
Program:
Output:
Result:
The above program is executed successfully and output is obtained correctly for all
valid inputs.
Aim:
Write a Python code to open a given file and construct a function to check for given words present
in it and display on found.
Program:
Output:
allbads.txt file
Result:
The above program is executed successfully and output is obtained correctly for all
valid inputs.
Aim:
Write a Python code to Read text from a text file, find the word with most number of
occurrences
Program:
Output:
Result:
The above program is executed successfully and output is obtained correctly for all
valid inputs.
Aim
Write a function that reads a file file1 and displays the number of words, number of vowels, blank
spaces, lower case letters and uppercase letters.
Program
Output
Result:
The above program is executed successfully and output is obtained correctly for all
valid inputs.