Obviously, some Python brevity is of the same type as the C/C++ ternary operator, which is to say, not really more efficient, but more efficient to write. How much do you use this in your Python? Here's an example:
for sets in re.finditer (pattern, doc, re.I):
medList.append ([found for found in sets.group (1, 2, 3) if found != None])
tagList.append (medList) The second line is an example, and all three lines could be combined. How much of this do you do? Just curious.