File opening in various modes
Qus. 1 : If we open a file in write mode and file does not exists, which of the error will generate?
- File Found Error
- File Not Exist Error
- File Not Found Error
- None of these
- a
- ar+
- r+
- w
- ab
- rw
- a+
- r+
- File Found Error
- File Not Exist Error
- File Not Found Error
- None of the above
- f.readlines()
- f.readline()
- f.read()
- f.line()
- Quick response code
- Same format in which the data is held in memory
- ASCII format
- Unicode format
- a
- f
- w
- t
- f = open("data.txt", "a")
- f = Open("data.txt", "ab")
- f= new("data.txt", "a")
- open("data.txt", "a")
- end
- beginning
- anywhere in between the file
- None of the above
- open_file()
- file_open()
- open()
- read_file()
- close_file()
- file_close()
- close()
- end_file()
- file_object=open(file_name,mode)
- open(file_object,file_name,mode)
- file_open(file_object,file_name,mode)
- file_object=file_open(file_name,mode)
- ab
- rw
- r+
- w+
- Write
- Read
- Append
- Read and Write Both
Programs
python program to read the full content of specified txt file
python program to accept file name and data from user and write data on file
python program to count the number of lines in the file
python program to display the size of a file in byte
python program to display all the records in a file along with line number
python program to display only last line of a text file
python program that reads a text file and creates another file that is identical except that every sequence of consecutive blank spaces is replaced by single space
python program to create a function that would read contents from the sports.dat and creates a file named Atheletic.dat
python program to read csv file content line by line
Write Python code to display sentence starting with given character from abc.txt file
Python code to display digits from abc.txt file
python program to copy the one contents to another
python program to copy the all word which start with constant in another file
python program to add delete and display all record of binary file
python program to read data from csv file
Python program to write data on csv file
python program to write first n prime number in text file
python program to marge the content of target file into source file
python program to read txt file data from specified index to specified length
python program to delete the specified file from computer