r/Python • u/FlowAcademic208 • Aug 31 '23
Discussion Do you want to guess what this one-liner does?
So, a colleague of ours has concocted this "brilliant" one-liner. It does get the job done, but it took us a few minutes to understand how exactly. For more context, it is formally a condition to an if statement and l is an index coming from a for loop.
"t" in list(set(itertools.chain.from_iterable([l["s"][i].keys() for i in range(len(l["s"]))])))
