The Python Oracle

Python idiom to return first item or None

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: The Builders

--

Chapters
00:00 Question
00:40 Accepted answer (Score 337)
01:40 Answer 2 (Score 268)
02:01 Answer 3 (Score 94)
02:22 Answer 4 (Score 37)
03:01 Thank you

--

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

Answer 3 links:
[next() Python 2.6+ ]: https://docs.python.org/2/library/functi...
[iterator.next() Python 2.2+ ]: https://docs.python.org/2/library/stdtyp...

--

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

--

Tags
#python #idioms

#avk47