Skip to content

Summary of the answers gathered on SO about list merging based on intersection.

Notifications You must be signed in to change notification settings

rikpg/IntersectionMerge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

===================================
List merging based on intersections
===================================

Summary of the answers from:

Python: simple list merging based on intersections
http://stackoverflow.com/q/9110837/1132524

Python merge multiple list with intersection [closed]
http://stackoverflow.com/q/9353802/1132524


=======
Credits
=======

All the credits to everyone from the links above.


=====
Usage
=====

Add a new function
------------------

All the merge functions are in core.py.

 - place the code in core.py
 - the name must end with '_merge'
 - and it needs a docstring like the others.

After that it will be auto loaded and everything will be taken care of on its own.

Test all the functions
----------------------

$ python3 test.py

lists/test_list.txt is just random, I didn't give it much thought.

Time all the functions
----------------------

$ python3 timing.py

- Ctrl-C to skip a test.
- Two fast Ctrl-C to exit.

About

Summary of the answers gathered on SO about list merging based on intersection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages