-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
50 lines (31 loc) · 958 Bytes
/
README
File metadata and controls
50 lines (31 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
===================================
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.