[[1, \'34\', \'44\'], [1, \'40\', \'30\', \'41\'], [1, \'41\', \'40\', \'42\'], [1, \'42\', \'41\', \'43\'], [1, \'43\', \'42\', \'44\'], [1, \'44\', \'34\', \'43\']
Using the unpacking operator *:
>> list(set.union(*map(set, a))) [1, '44', '30', '42', '43', '40', '41', '34']
(Thanks Raymond Hettinger for the comment!)
(Note that
set.union(*tup)
will unpack to
set.union(tup[0], tup[1], ... tup[n - 1])
)