I want to know whether the temperature in Outer space is higher than earth's or cold.Is the temperature in outer space vary as it does on earth?
The temperature in the heliosphere is about one million Kelvin, lower (but still very hot) in the outer regions of the heliosphere, higher close to the sun. But the density of the plasma is very low, so you wouldn't feel the heat (except close to the sun).
Within Earth's exosphere, reaching up to 10,000 km, the temperature is lower, roughly 1,000 to 1,500 C.
Due to the very low density, hot and cooler fractions can penetrate each other, such that there doesn't need to be a uniquely defined temperature.
Than answer to whether it varies or is definitely yes but not in the same way as on Earth. The temperature in completely empty space with no stars for large distances would approach absolute zero ( −459.67°F or −273.15°C depending on the system to which you are accustomed) the further you go away from any heat producing body such as a star or active black hole. If you get close to stars or active black holes or many other things, the temperature could be thousands of degrees higher than on Earth. It just depends on distance.