Skip to content

Tag Archives: python-dict

Lists are just like the arrays, declared in other languages. Lists need not be homogeneous always which makes it a most powerful tool in Python.… Read More
A Dictionary in Python works similar to the Dictionary in the real world. Keys of a Dictionary must be unique and of immutable data types… Read More
Dictionary in Python is an unordered collection of data values, used to store data values like a map, which unlike other Data Types that hold… Read More
To calculate the length of a dictionary, we can use the Python built-in len() method. The len()  method returns the number of keys in a… Read More
Dictionaries are the fundamental data structure in Python and are very important for Python programmers. They are an unordered collection of data values, used to… Read More
dict.items() and dict.iteriteams() almost does the same thing, but there is a slight difference between them – dict.items(): returns a copy of the dictionary’s list… Read More
Sometimes, we just wish to work with unique elements and any type of repetition is not desired, for these cases, we need to have techniques… Read More
Given two strings str and pattern, find the smallest substring in str containing all characters of pattern efficiently. Examples: Input : str = 'geeksforgeeks' pattern… Read More
Given a dictionary, the task is to find keys with duplicate values. Let’s discuss a few methods for the same. Method #1: Using Naive approach… Read More
Usually, A dictionary is a collection which is unordered, changeable and indexed. In Python, dictionaries are written with curly brackets, and they have keys and… Read More
Given a dictionary, the task is to filter all the negative values from given dictionary. Let’s discuss few methods to do this task. Method #1:… Read More
You have given a list of dictionaries, the task is to return a single dictionary with sum values with the same key. Let’s discuss different… Read More
Given a dictionary, the task is to split a dictionary in python into keys and values into different lists. Let’s discuss the different ways we… Read More
Given two dictionaries, the task is to find the intersection of these two dictionaries through keys. Let’s see different ways to do this task. Method… Read More
Given a dictionary, the task is to change the key based on the requirement. Let’s see different methods we can do this task in Python.… Read More

Start Your Coding Journey Now!