The Python Oracle

Is there shorthand for returning a default value if None in Python?

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: Thinking It Over

--

Chapters
00:00 Question
00:32 Accepted answer (Score 520)
00:55 Answer 2 (Score 218)
01:07 Answer 3 (Score 66)
01:26 Answer 4 (Score 3)
01:39 Thank you

--

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

Answer 2 links:
[conditional expression]: https://docs.python.org/2/reference/expr...

--

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

--

Tags
#python

#avk47