import matplotlib.pyplot as plt
import random
class Team(object):
def __init__(self):
self.score = random.randint(1,1000)
def plot_hist(teams, bins=40):
scores = [team.score for team in teams]
plt.hist(scores, bins)
plt.show()
teams = [Team() for _ in range(1000)]
plot_hist(teams)