You are developing a Python application where you need to store configuration settings. Which data type would you use to store key-value pairs of configuration settings?

  • Dictionaries
  • Lists
  • Sets
  • Tuples

In Python, dictionaries are used to store key-value pairs, making them an excellent choice for storing configuration settings where you can easily access values by their keys. Lists and tuples are used for ordered collections of items, and sets are used for storing unique elements.

Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *