I've written this code so that it generates 4 random ints ranging from 1-6 and then remove the smallest number and add it to a list that is returned.
I was reading around and found that list comprehensions are the more "pythonic" solution instead of these small for range loops. I would like to know how to write this code as a list comprehension and any help would be greatly appreciated.
stats = []
for stat in range(6):
score = [random.randint(1, 6) for n in range(4)]
score.remove(min(score))
stats.append(sum(score))
return stats