Oxygen is a colourless gas with no smell, so you cannot identify it by looking at it. There is a simple chemical test.
Collect a sample of the gas in a test tube. Light a wooden splint, blow out the flame so that the end is still glowing, and put the glowing splint into the gas.
If the gas is oxygen, the glowing splint relights. Oxygen supports burning, so the splint burns faster. In other gases, such as carbon dioxide, the glowing splint goes out.