1.

Which function is used to write all the characters?(a) write()(b) writecharacters()(c) writeall()(d) writechar()The question was asked in an online interview.This question is from Files in section Regular Expressions and Files of Python

Answer»

Right option is (a) WRITE()

The explanation: To write a fixed sequence of CHARACTERS to a file

fh = open(“HELLO.txt”,”w”)

write(“Hello WORLD”).



Discussion

No Comment Found

Related InterviewSolutions