stalls on 2000 Oldsmobile Alero

Enthusiast 01be16a5a93688912f14755221fb15211b518d9a788cf01b455e03cc1bd585ac
car will start but won't take gas to accelate runs good at idle has code po171 o2 sensor change that saids fuel to lean on bank 1 it is only a 4 cylinder dont understand can anyone help?
(2) Answers
To clarify - a 4 cylinder engine only has one bank.

There is a upstream and downstream (also called a cat monitor sensor) oxygen sensor on this one bank.

"Bank 2" is used for engines in a V formation.

Regarding your problem - I would not look at your oxygen sensor, but rather look for a mass air flow leak - such as a disconnected or leaking air tube after the air box, or a vacuum leak or vacuum hose disconnected. This will also set lean codes (P0171 in this case) and cause the stalling you are experiencing, as the fuel system cannot keep up with all the air coming in.

Good luck.
Bank 1 on a 4 cyl. engine will be the first sensor nearest the exhaust manifold. It will be before the cat. convertor, bank 2 would be the downstream sensor after the convertor