Podcast
Questions and Answers
which one of the following is the right way to close a file?
which one of the following is the right way to close a file?
if a file File.txt has 10 lines written in it, what will be the result of the following line?
len(open("File.txt").readlines())
if a file File.txt has 10 lines written in it, what will be the result of the following line? len(open("File.txt").readlines())
a file is stored in ____ memory
a file is stored in ____ memory
what will happen when a file is opened in write mode and then immediately closed?
what will happen when a file is opened in write mode and then immediately closed?
Signup and view all the answers
which one of the following is the right way to write "Good Morning" in a file?
which one of the following is the right way to write "Good Morning" in a file?
Signup and view all the answers
which method is used to read a single line from the file?
which method is used to read a single line from the file?
Signup and view all the answers
the default access mode is _______
the default access mode is _______
Signup and view all the answers
by default, a new file is created in which directory?
by default, a new file is created in which directory?
Signup and view all the answers
what is the purpose of the with statement in python file handling?
what is the purpose of the with statement in python file handling?
Signup and view all the answers
what is the purpose of the see() method in python file handling?
what is the purpose of the see() method in python file handling?
Signup and view all the answers