Python File Handling - Quiz

  • AWhen you open a file for reading, if the file does not exist, an error occurs
  • BWhen you open a file for writing, if the file does not exist, a new file is created
  • CWhen you open a file for writing, if the file exists, the existing file is overwritten with the new file
  • DAll of the mentioned
  • AASCII
  • BUnicode
  • C(A) and (B)
  • DNone of these
  • AOpens or creates a text file named python.csv to write
  • BOpens or creates a text file named python.csv to append
  • COpens or creates a text file named python.csv to read
  • DOpens a new file named python.csv to write
  • AOpens or creates a text file named python.csv to write
  • BOpens or creates a text file named python.csv to append
  • COpens or creates a text file named python.csv to read
  • DOpens a new file named python.csv to append
  • AOpens a text file named python.txt to read from or write to
  • BOpens a text file named python.txt to read
  • COpens a text file named python.txt to write
  • DOpens a new file named python.txt to append
  • AOpens a text file named python.txt to read
  • BOpens a text file named python.txt to write to or read from
  • COpens a text file named python.txt to write
  • DOpens a new file named python.txt to append
  • AOpens an existing text file named python.bat to write
  • BOpens an existing binary file named python.bat to write
  • COpens an existing binary file named python.bat to append
  • DOpens an existing binary file named python.bat to read
  • AOpens or creates a binary file named python.bat to write
  • BOpens or creates a binary file named python.bat to append
  • COpens or creates a binary file named python.bat to read
  • D Opens a new file named python.bat to write