BaşlayınÜcretsiz Başlayın

Combining Pokémon names and types

Three lists have been loaded into your session from a dataset that contains 720 Pokémon:

  • The names list contains the names of each Pokémon.
  • The primary_types list contains the corresponding primary type of each Pokémon.
  • The secondary_types list contains the corresponding secondary type of each Pokémon (nan if the Pokémon has only one type).

We want to combine each Pokémon's name and types together so that you easily see a description of each Pokémon. Practice using zip() to accomplish this task.

Bu egzersiz

Writing Efficient Python Code

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Combine names and primary_types
names_type1 = [*____(____, ____)]

print(*names_type1[:5], sep='\n')
Kodu Düzenle ve Çalıştır