Return to home page

Python Quiz: Module 4

List of Lists


  1. How can the PyCharm debugger help you as a developer?
  2. Which of the following actions take place when you open a file in write mode?
  3. Which of the following commands will allow you to write data to a file?
  4. If file has been opened in read mode, which of the following will read one line of data at a time
  5. What is the difference between file.read() and file.readlines()?
  6. Using with open("hello.txt") as my_file: guarantees which of the following after the block of code following the : is executed?
  7. Which if the following is a tuple?

  8. Which if the following is a list?

  9. Which if the following is a set?

  10. Which if the following is a dictionary?

  11. What is the use case for a tuple?

  12. What is the use case for a dictionary?

  13. What is the use case for a list?

  14. What is the use case for a set?

  15. Python strings are mutable.

  16. Lists and Tuples are ordered collections.

  17. If `data_list = ['a', 'b', 'c'] which of the following will unpack the list?

  18. If you want to split a string from a CSV file in order to create a list, why is it important to strip the string before splitting it?