Skip to content

Tag Archives: python-dict

Given two strings, find if we can make first string from second by deleting some characters from second and rearranging remaining characters. Examples: Input :… Read More
Given an array of names of candidates in an election. A candidate name in the array represents a vote cast to the candidate. Print the… Read More
Given a string of lowercase characters only, the task is to check if it is possible to split a string from middle which will gives… Read More
Prerequisite : Dictionary data structure Given a string, Find the 1st repeated word in a string. Examples: Input : "Ravi had been saying that he… Read More
Given a sequence of strings, the task is to find out the second most repeated (or frequent) string in the given sequence. (Considering no two… Read More
Given a string which contains lower alphabetic characters, we need to remove at most one character from this string in such a way that frequency… Read More
Given a dictionary and a character array, print all valid words that are possible using characters from the array. Note: Repetitions of characters is not… Read More
Given an input string and a pattern, check if characters in the input string follows the same order as determined by characters present in the… Read More
Given an array of words, print all anagrams together ? Examples: Input : arr = ['cat', 'dog', 'tac', 'god', 'act'] Output : 'cat tac act… Read More
Given a string and a number k, find the k-th non-repeating character in the string. Consider a large input string with lacs of characters and… Read More
Like List Comprehension, Python allows dictionary comprehensions. We can create dictionaries using simple expressions. A dictionary comprehension takes the form {key: value for (key, value)… Read More
Previous article of this segment dealt with sorting list of dictionaries by values using lambda function. Ways to sort list of dictionaries by values in… Read More
Sorting has always been a useful utility in day-to-day programming. Dictionary in Python is widely used in many applications ranging from competitive domain to developer… Read More
Prerequisite: Dictionary 1) What is the output of the following program?  Python3 dictionary = {'GFG' : 'geeksforgeeks.org',               'google' : 'google.com',               'facebook' : 'facebook.com'               } del dictionary['google'];… Read More
Prerequisite – Graphs To draw graph using in built libraries – Graph plotting in PythonIn this article, we will see how to implement graph in python… Read More

Start Your Coding Journey Now!