A pythonic and concise way to build this list?

How can I write the following code more briefly?

    scores = []
    for f in glob.glob(path):
        score = read_score(f, Normalize = True)
        scores.append(score)

I know this can be written in one or two lines without use append, but I'm new to Python.

+5
source share
1 answer

Oh, I got it when viewing a related question :

scores = [read_score(f, normalize=True) for f in glob.glob(path)]
+7
source

All Articles