The Python Oracle

From list of integers, get number closest to a given value

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Sunrise at the Stream

--

Chapters
00:00 Question
00:28 Accepted answer (Score 480)
01:17 Answer 2 (Score 193)
04:17 Answer 3 (Score 12)
04:42 Answer 4 (Score 6)
05:07 Thank you

--

Full question
https://stackoverflow.com/questions/1214...

Accepted answer links:
[built-in ]: http://docs.python.org/library/functions...
[@Lauritz's answer]: https://stackoverflow.com/a/12141511/224...

Answer 2 links:
[bisect.bisect_left]: http://docs.python.org/library/bisect.ht...
[highest voted answer]: https://stackoverflow.com/a/12141207/566...

Answer 3 links:
[lambda]: http://docs.python.org/tutorial/controlf...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #list #sorting #integer

#avk47