pypokedex icon indicating copy to clipboard operation
pypokedex copied to clipboard

need some help

Open pecorhouse opened this issue 3 years ago • 1 comments

how do i take only the name of a pokemon? for exaple: not "(dex=116, name='horsea')" but only horsea

pecorhouse avatar Aug 30 '21 13:08 pecorhouse

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.

arnavb avatar Sep 03 '21 21:09 arnavb

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!

arnavb avatar May 08 '23 02:05 arnavb