I am translating some code from Python to C++. I came across the following:
set(x for listX in listY for x in listX)
I am quite well-versed in C++ and know some basic constructs in Python. In the above code, I know that a set is being created but I do not understand the code inside the brackets. Any help?
listY is probably something like the structure below, so the expanded code is:
notice: sets won’t allow duplicate entries