β back to unit
Easy
# power tools easy
How Many Different Birds Today?
The birdwatching log lists every sighting β but the same pigeon keeps coming back. π¦
You get the sightings. Print how many different bird types appeared, in ONE line of code if you can!
Example:
Input: sightings = ["robin", "pigeon", "robin", "jay"]
Output: 3
set(sightings) collapses the repeated "robin", leaving {"robin", "pigeon", "jay"} β 3 unique birds.
π‘ need a hint?
pt-different-birds.pyπ given lines are locked β write your code in between
loading...