O'Reilly logo
  • Joshua Marris thinks this is interesting:

15-6. Automatic Labels: Modify die_visual.py and dice_visual.py by replacing the list we used to set the value of hist.x_labels with a loop to generate this list automatically. If you’re comfortable with list comprehensions, try replacing the other for loops in die_visual.py and dice_visual.py with comprehensions as well.

From

Cover of Python Crash Course

Note

hist.x_labels = list(range(2,max_result))