Dictionary (hash)

  1. What is a dictionary
  2. When to use dictionaries
  3. Various dictionary examples
  4. Dictionary
  5. Create dictionary
  6. keys
  7. Loop over keys
  8. Loop over dictionary keys
  9. Loop using items
  10. values
  11. Not existing key
  12. Get key
  13. Does the key exist?
  14. Does the value exist?
  15. Delete key
  16. List of dictionaries
  17. Shared dictionary
  18. immutable collection: tuple as dictionary key
  19. immutable numbers: numbers as dictionary key
  20. Sort a dictionary
  21. Sort dictionary values
  22. Sort dictionary by value
  23. Sort dictionary keys by value (another example)
  24. Insertion Order is kept
  25. Change order of keys in dictionary - OrderedDict
  26. Set order of keys in dictionary - OrderedDict
  27. Setdefault
  28. Exercise: count characters
  29. Exercise: count words
  30. Exercise: count words from a file
  31. Exercise: Apache log
  32. Exercise: Combine lists again
  33. Exercise: counting DNA bases
  34. Exercise: Count Amino Acids
  35. Exercise: List of dictionaries
  36. Exercise: Dictionary of dictionaries
  37. Exercise: Age limit with dictionaries
  38. Exercise: Merge files with timestamps
  39. Solution: count characters
  40. Default Dict
  41. Solution: count characters with default dict
  42. Solution: count words (plain)
  43. Solution: count words (defaultdict)
  44. Solution: count words (Counter)
  45. Solution: count words in file
  46. Solution: Apache log
  47. Solution: Apache log using split
  48. Solution: Combine files
  49. Solution: Combine files-improved
  50. Solution: counting DNA bases
  51. Solution: Count Amino Acids
  52. Solution: List of dictionaries
  53. Solution: Dictionary of dictionaries
  54. Solution: Age limit with dictionaries
  55. Solution: Merge files with timestamps
  56. Do not change dictionary in loop
  57. Named tuple (sort of immutable dictionary)
  58. Create dictionary from List
  59. Sort Hungarian letters (lookup table)