best way to find similar items in python
- by user230911
I have 1M numbers:N[], and 1 single number n, now I want to find in those 1M numbers that are similar to that single number, say an area of [n-10, n+10].
what's the best way in python to do this? Do I have to sort the 1M number and do an iteration?
Thanks