In Python how the title() method can be used?
Is it only for a single item or also for a whole list?
The first print works, the second returns an error. Why?
animals = ['dog', 'cat', 'whale', 'koala', 'panda']
print(f"\nname of the 3rd animal: {animals[2].title()}")
print(f"\nname of all animals: {animals.title()}")
The first print works, the second returns an error. Why?