We saw in the previous posts how to retrieve items from Dictionaries. Now, let’s learn other operations associated with Dictionaries in Python. Length of Dictionaries We have created a dictionary called as personDict. We can find the length of Dictionaries as shown below. Example: Output: This will display the number of items in a dictionary.Continue reading “Dictionaries Again”
Tag Archives: collections
Dictionaries
Dictionaries are a bag of key value pairs which is written inside two curly braces. It is a collection of key values pairs that is not ordered, can be changeable and can be indexed. Rather than indexes, in any other collections like lists, arrays, etc., items can be obtained via Key. Now let’s see howContinue reading “Dictionaries”
SETs
Basic explanation of usage of sets in Python