This article explains how to create passwords for the Yahoo Mail app so that you can use other email clients to access Yahoo Mail, even when you have two-step verification set up.
You can have Yahoo Mail create random (read: very hard to guess) passwords, one for each program you want to use with your email account. If you stop using a program or no longer trust a particular service, you can revoke that password and make it no longer work.
To create a new password that your email program can use to log in to Yahoo Mail:
Place the cursor over your name in the Yahoo Mail navigation bar.