Created
February 3, 2022 06:01
-
-
Save terashim/46e225671fdae768de0aba240c57b120 to your computer and use it in GitHub Desktop.
Python で None を置換する ifnone 関数. Null 合体. SQL でいう IFNULL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ifnone(x, y): | |
return y if x is None else x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment