According to the Department of Energy Office of Science, in space, the gravity is extremely low and the gases located in space spread out very quickly. These gases become spread so far out that it is said that there is no oxygen in space.
However, when people say that there is no oxygen in space, actually they mean that humans are unable to use the oxygen present in space in order to breathe. On the earth, gravity holds gases such as oxygen close to Earth. On planets or moons with less dense gravity, any gases are able to escape into space.