A

Admin • 833.24K Points
Coach

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
  • Correct Answer - Option(B)
  • Views: 21
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.