set.union
does what you want:
>>> results_list = [[1,2,3], [1,2,4]]
>>> results_union = set().union(*results_list)
>>> print(results_union)
set([1, 2, 3, 4])
You can also do this with more than two lists.
More Related Contents:
- Shuffling a list of objects
- Pandas column of lists, create a row for each list element
- What is the difference between `sorted(list)` vs `list.sort()`?
- What do ellipsis […] mean in a list?
- How can I get list of values from dict?
- Converting a string representation of a list into an actual list object [duplicate]
- Apply function to each element of a list
- Python list rotation [duplicate]
- List on python appending always the same value [duplicate]
- Why does ‘.sort()’ cause the list to be ‘None’ in Python? [duplicate]
- Python’s insert returning None?
- Why does appending to one list also append to all other lists in my list of lists? [duplicate]
- How to return a subset of a list that matches a condition [duplicate]
- Remove duplicates and original from list
- Sliding window maximum in O(n) time
- Why do these list methods (append, sort, extend, remove, clear, reverse) return None rather than the resulting list?
- Sorting list according to corresponding values from a parallel list [duplicate]
- Appending to list in Python dictionary [duplicate]
- Does Python have an immutable list?
- Swap values in a tuple/list inside a list in python?
- Getting indices of True values in a boolean list
- Python: How to sort a list of dictionaries by several values?
- What is the cost/ complexity of insert in list at some location?
- Reading specific columns from a text file in python
- How does str(list) work?
- Nested lambda statements when sorting lists
- Filter a list of tuples based on condition
- How can I convert this string to list of lists? [duplicate]
- Removing an item from a list of lists based on each of the lists first element
- Check list monotonicity