Should I delete my contacts if my account was hacked?
No. If your friends are receiving spam that looks like it’s coming from your email account, but your account isn’t compromised, removing your friends' addresses won’t help. The spammer has already gathered and saved the email addresses from your address book as well as the email addresses from messages in your Inbox and Sent folder.
If your account is compromised, Yahoo will ask you to provide extra verification when you sign in to prove it's your account. Then you'll be asked to change your password.
Learn more about spoofing and how to keep your account safe: