Navigation

  • index
  • next |
  • previous |
  • PyHowTo: 1798 tasks and 2296 solutions »
  • Basic »

Table of Contents

Python v3.7 HowTos:

  • ------ Algorithms ------
  • Recursion
  • Backtracking
  • Dynamic Programming
  • Greedy
  • Sort
  • Binary Search
  • Depth First Search [DFS]
  • Breadth First Search [BFS]
  • Binary Search Tree [BST]
  • ------ Structures ------
  • Array
  • String
  • Heap
  • Stack
  • Queue
  • Tree
  • Linked List
  • Hash Table
  • Bit Manipulation
  • Two Pointers
  • Math
  • Decorator
  • -------- Tutors --------
  • Basic
  • Intermediate
  • Advanced
  • Interview
  • ----- Applications -----
  • Spark
  • Tkinter
  • Turtle
  • Games
  • Web
  • -------- About ---------
  • About
  • History

Previous topic

Get execution time for a python method

Next topic

Examples

Quick search

Dictionary¶

How To: Basic::Dictionary

  • Examples
  • Creating a Dictionary
  • Generate a dictionary of numbers (1..N) in form (x, x*x)
  • Print a dictionary where the keys (1..15) and values=key*key
  • Create a dictionary from a string tracking the count of the letters
  • Get a dictionary from an object’s fields
  • Convert a list into a nested dictionary of keys
  • Create a dictionary from two lists without losing duplicate values
  • Map two Lists into a dictionary
  • Print a dictionary line by line
  • Print a dictionary in table format
  • Concatenate dictionaries
  • Add a key
  • Remove a key
  • Iterate over dictionaries using for loops
  • Get the depth of a dictionary
  • Check if dictionary is empty or not
  • Check if a given key already exists
  • Check is set of keys exists in a dictionary
  • Match key:value is present in two dictionaries
  • Get the maximum and minimum value
  • Find the highest 3 values
  • Get the top three items
  • Combine values in list of dictionaries
  • Sum all the values
  • Multiply all the items
  • Replace dictionary values with their average
  • Get all combinations of letters from a different keys
  • Get all unique values in a dictionary
  • Get the key, value, and count
  • Count number of Items in a Dictionary Value that is a List
  • Count the values associated with key
  • Merge dictionaries
  • Sort (ascending and descending) by value
  • Sort by key
  • Sort Counter by Value
  • Sort lists in DOL alphabetically
  • Remove Duplicates (same values) from Dictionary
  • Remove spaces from keys
  • Combine two dictionaries adding values for common keys

Navigation

  • index
  • next |
  • previous |
  • PyHowTo: 1798 tasks and 2296 solutions »
  • Basic »
© Copyright 2020, Sergiy Zaytsev, szaytsev@hotmail.com. Created using Sphinx 2.3.0.