Created
December 22, 2014 16:57
-
-
Save phalt/c7a649901395a203ecb8 to your computer and use it in GitHub Desktop.
Get a character with a specific name from swapi.co
This file contains hidden or 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
| import swapi | |
| get_character("name"): | |
| for c in swapi.get_all("people"): | |
| if c.name == name: | |
| return c | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment