πŸ“Š Python
Q. What will happen if you write a list directly to a file using write()?
  • (A) It writes list as string
  • (B) It raises TypeError
  • (C) It converts list to text
  • (D) It appends data
πŸ’¬ Discuss
βœ… Correct Answer: (B) It raises TypeError

Explanation: write() only accepts strings, not lists or other data types.

Explanation by: Mr. Dubey
write() only accepts strings, not lists or other data types.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
67
Total Visits
πŸ“½οΈ
10 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate