When you’re preparing to plot a histogram, it’s simplest to not think in terms of bins but rather to report how many times each value appears (a frequency table). A Python dictionary is well-suited for this task.
Click here to learn more: https://realpython.com/courses/python-histograms/