I've seen some snippets of python code in which a loop was written as follows:
someList = g.db.execute('SELECT title, body FROM posts')
posts = [dict(title=x[0],body=[1]) for x in someList.fetchAll()]
What is this kind of loop refered to as?
I realize it could be just refered to as a for loop, but the syntax it quite different from a c-based language (shorter and more productive), so I just wondered if have some other name written like this.