What is dictionaries in Python give example?

Dictionaries are optimized to retrieve values when the key is known . The following declares a dictionary object. Example: Dictionary. capitals = {“USA”:”Washington D.C.”, “France”:”Paris”, “India”:”New Delhi”} Above, capitals is a dictionary object which contains key-value pairs inside { } .

Sizin İçin Seçtik  Twitter'da SF ne demek?

Leave a Reply

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