I have a list of lists (that might have any number of lists as entries) and want to find the union of this list (as a set) in Sage. I would think there is a short existing command already but I was not able to find it.
Here an example:
W=[[2, 1], [2], [3, 1], [1]]
T=W.union()
display(W)
display(T)
The desired output is T=[1,2,3] but it seems the command "union" does not work.