That list comprehension is actually very much the reason why Python is terrific. C# programmers will be familiar with the idea from Linq.
for: This is a for loop
a,b,c,d: Each value of the iterator is itself composed of 4 values. In Python this is called a tuple, but you can think of it as an array if it helps. The first value is bound to a, the second to b, etc. Thus, the variables a,b,c, and d are defined in the loop body.
in: The next thing mentioned is the iterator
[x.q for x in y if x.z]+[x.r for x in y if x.z]: This iterator is a mess, let's look at it's parts, which are:
[x.q for x in y if x.z]
+
[x.r for x in y if x.z]:
[x.q for x in y if x.z]: y is an iterator. Return only the q property of each item in y, only if the z property is defined. This results in a list (another Python datatype which you can think of as an array) being return, of q properties.
[x.r for x in y if x.z]: y is an iterator. Return only the r property of each item in y, only if the z property is defined. This results in a list being return, of r properties.
+: Combine the list of q properties with the list of r properties.
Like learning another (human) language, it it incomprehensible at first. However, I'm no Pythonista and even for me it was very simple to figure out what this does.