filmov
tv
@52. PYTHON PROGRAMMING-TEXT FILE | READ | READ LINE | READ LINES

Показать описание
Python Programming for Beginners Provides:
Full course of Python in Hindi
Also includes the Syllabus of Classes XIth & XIIth.
Easy Learning Classes to explain the file handling in python:
two type of file:
1. text file: 'r'-read, 'w'-write, 'a'-append , ,w+'-write read , 'r+'-read write, 'a+'-append read
for reading: read(), read(n), readline() , readlines(), readline(n)
for writing : write(), writelines()
2. binary file :rb'-read, 'wb'-write, 'ab'-append , ,wb+'-write read , 'rb+'-read write, 'ab+'-append read
try some questions:
1.WAF to create a file and copy one file to another file.
2.WAF to read lines from text file and count the number of uppercase, lowercase and digit are present in file.
3.WAF to read lines from text file and count the total number of "is", "to"and "up" occurs in the file.
4.WAF to to pass text file as a argument and display first and last line of the text file.
5.WAF to read lines and count the word begin with 'T' and display it.
6.WAF to read the content and display the content in reverse order.
7. WAF to read lines from text file and count the number of space present in file.
format :Event- Participant name
10. WAF to search the name address of person having age more than 30.
format: name address age.(in one line)
#Kundantutorials#python#filehandling#textfile #readfile #writefile
Full course of Python in Hindi
Also includes the Syllabus of Classes XIth & XIIth.
Easy Learning Classes to explain the file handling in python:
two type of file:
1. text file: 'r'-read, 'w'-write, 'a'-append , ,w+'-write read , 'r+'-read write, 'a+'-append read
for reading: read(), read(n), readline() , readlines(), readline(n)
for writing : write(), writelines()
2. binary file :rb'-read, 'wb'-write, 'ab'-append , ,wb+'-write read , 'rb+'-read write, 'ab+'-append read
try some questions:
1.WAF to create a file and copy one file to another file.
2.WAF to read lines from text file and count the number of uppercase, lowercase and digit are present in file.
3.WAF to read lines from text file and count the total number of "is", "to"and "up" occurs in the file.
4.WAF to to pass text file as a argument and display first and last line of the text file.
5.WAF to read lines and count the word begin with 'T' and display it.
6.WAF to read the content and display the content in reverse order.
7. WAF to read lines from text file and count the number of space present in file.
format :Event- Participant name
10. WAF to search the name address of person having age more than 30.
format: name address age.(in one line)
#Kundantutorials#python#filehandling#textfile #readfile #writefile