I was going through a code which have the following function. I was wondering if it possible to write the for loops in multiple lines and return the same exact value as the following.
def RecordsLists(self, a, q):
return set([a1.union(a2) for a1 in a for a2 in a if len(a1.union(a2)) == q])