NEW YORK (AP) — U.S. stocks rose Friday to finish a wild July for Wall Street as Amazon leaped, Apple sank and rising oil prices worsened worries about inflation staying high. Friday's gains sent the S&P 500 to its first winning week in three, but the main measure of the U.S. stock market nevertheless finished the month with a tiny loss. Amazon led the market with a leap of 15.3% after reporting much stronger profit for the latest quarter than analysts expected. More firmly on the losing end of Wall Street was Apple, which dropped 7.4% despite reporting stronger profit for the latest quarter than expected. The gains came despite another rise in oil prices as uncertainty continues about when the war with Iran will allow crude to flow freely again from the Middle East.