πŸ“Š Problem Solving and Python Programming
Q. Correct syntax of file.writelines() is?
  • (A) file.writelines(sequence)
  • (B) fileobject.writelines()
  • (C) fileobject.writelines(sequence)
  • (D) none of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) fileobject.writelines(sequence)

Explanation: the method writelines() writes a sequence of strings to the file. the sequence can be any iterable object producing strings, typically a list of strings. there is no return value.


Explanation by: Mr. Dubey
the method writelines() writes a sequence of strings to the file. the sequence can be any iterable object producing strings, typically a list of strings. there is no return value.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
357
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
81%
Success Rate