Skip to content

Get Pokemon

Sar Champagne Bielert edited this page Apr 19, 2024 · 3 revisions

**⚠️ Common Mistakes**

- 

## I-mplement

```python
def find_pokemon(my_pokemon, pokemon_type):
  
  have_type = []
  
  for pokemon in my_pokemon:
    if pokemon_type in pokemon.types:
      have_type.append(pokemon)

  return have_type


## Testing example:
have_type = find_pokemon(my_pokemon, pokemon_type)
for pokemon in have_type:
    print(pokemon.name)
Clone this wiki locally