Created
December 26, 2019 03:36
-
-
Save kunigami/f35e4ab4e4c0db3f68a1f8e338ab6973 to your computer and use it in GitHub Desktop.
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 first(xs: List[int]) -> Optional[int]: | |
if len(xs) == 0: | |
return None | |
return xs[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment