pypokedex
pypokedex copied to clipboard
need some help
how do i take only the name of a pokemon? for exaple: not "(dex=116, name='horsea')" but only horsea
Hi!
I'm not entirely certain what you are asking, but you can fetch a Pokemon using either the Pokedex number or its name, so:
>>> p = pypokedex.get(name='horsea')
or
>>> p = pypokedex.get(dex=116)
To get the Pokemon's name once you have the object, you can just use p.name
.
Since there hasn't been further follow-up, I'm going to assume this is solved. Feel free to comment if you'd like more clarification!