Python MCQs with answers Page - 16

Here, you will find a collection of MCQ questions on Python. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 831.35K Points
Coach

Q. Amongst which of the following is a function which does not have any name?

  • (A) Del function
  • (B) Show function
  • (C) Lambda function
  • (D) None of the mentioned above

A

Admin • 831.35K Points
Coach

Q. Amongst which of the following is / are the key functions used for file handling in Python?

  • (A) open() and close()
  • (B) read() and write()
  • (C) append()
  • (D) All of the mentioned above

A

Admin • 831.35K Points
Coach

Q. Amongst which of the following is / are needed to open an existing file?

  • (A) filename
  • (B) mode
  • (C) Both A and B
  • (D) None of the mentioned above

A

Admin • 831.35K Points
Coach

Q. The function file_object.close() is used to ___.

  • (A) To open the existing file
  • (B) To append in an opened file
  • (C) To close an opened file
  • (D) None of the above

A

Admin • 831.35K Points
Coach

Q. The write() method takes a string as an argument and ___.

  • (A) writes it to the text file
  • (B) read from the text file
  • (C) append in a text file
  • (D) None of the mentioned above

A

Admin • 831.35K Points
Coach

Q. The seek() method is used to ___.

  • (A) Saves the file in secondary storage
  • (B) Position the file object at a particular position in a file
  • (C) Deletes the file form secondary storage
  • (D) None of the mentioned above

A

Admin • 831.35K Points
Coach

Q. mongst which of the following function is / are used to create a file and writing data?

  • (A) append()
  • (B) open()
  • (C) close()
  • (D) None of the mentioned above

A

Admin • 831.35K Points
Coach

Q. The module Pickle is used to ___.

  • (A) Serializing Python object structure
  • (B) De-serializing Python object structure
  • (C) Both A and B
  • (D) None of the mentioned above

A

Admin • 831.35K Points
Coach

Q. Amongst which of the following is / are the method of convert Python objects for writing data in a binary file?

  • (A) set() method
  • (B) dump() method
  • (C) load() method
  • (D) None of the mentioned above

A

Admin • 831.35K Points
Coach

Q. Amongst which of the following is / are the method used to unpickling data from a binary file?

  • (A) load()
  • (B) set() method
  • (C) dump() method
  • (D) None of the mentioned above

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ