Question 1

Consider the following text file: Example1.txt :

This is line 1

This is line 2

This is line 3

What is the output of the following lines of code?

with open("Example1.txt","r") as file1:
  
    FileContent=file1.read()
    
    print(FileContent)


Question 2

Consider the file object: File1 . How would you print the first two lines of text?


Question 3

Consider the following line of code:

with open(example1,"r") as file1:

What mode is the file object in?