Q. How are the following codes different from one another?


(a)

fp = open("file.txt", "r")

fp.read()


(b) fp = open ("file.txt", 'r')


Answer =

(a) It read the txt file.
(b) It open only in read mode

Post a Comment

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

Previous Post Next Post