Don't delete your entire account to avoid someone else registering it. Instead, delete saved emails and private information, and leave it with a strong password.
Especially if you used that email address to authenticate with other services (Facebook, online banking, GMail backup address, etc.) or gave it to a lot of people, you should keep it in your possession. Otherwise, an attacker could reclaim the address and simply ask these services for password reset links. Or one of your old contacts might write someday, assuming it's still you who owns the address. You should only delete the account if you can be sure that no entity trusts it anymore, neither your contacts nor any services.
Hence, it would have been sensible of Yahoo to block deleted addresses forever, but in their FAQ they say it's actually possible to register a previously used ID:
Register a previously used ID
A deleted Yahoo account ID may become available for future use, and you’re welcome to try to register it. However, Yahoo can't specify how long until a deleted ID may become available, and we can't guarantee that it will become available.
So, it's good advice to not delete your Yahoo ID to prevent new ownership and instead delete personal information from it to avoid damage in case of a new breach.