Inflation held steady in February, but rising energy prices because of the war with Iran could soon renew upward pressure on costs for American households.