Evaluate log_prob with different distribution in one-line

Suppose I have data, x = [batch, width, height], y = label
I would like to calculate log_prob of x for each label.
For example, log_prob of x with label = 1 is calculated by Normal distribution with mean = label, variance = 1.
So, I calculated log_prob by initializing distributions for each label as below

dist = [Gaussian(mean = i, std = 1) for i in range(10)]
for x, label in data_loader:
      log_prob += dist[label].log_prob(x)

But I want to calculate it with one line dist.log_prob(x), but I don’t know how to calculate it with one line.
Would you anyone help me? or is it impossible?