Q. What is the output produced by following code ?


obj = open("New.txt","w")

obj.write("A poem by Paramhansa Yogananda ")

obj.write("Better than Heaven or Arcadia")

obj.write("I love thee, O my India!")

obj.write("And thy love I shall give")

obj.write("To every brother nation that lives.")

obj.close()

obj1 = open("New.txt","r")

s1 = obj1.read(48)

print(s1)

obj1.close()


Answer :-

The output produced by above code will be :

A poem by Paramhansa Yogananda Better than Heave
>>>

1 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post