The "better way" was described by Ardra above. Instead of turning the oven knob to "pilot" and holding the knob in while you try to light the pilot, turn the knob all the way up to the temperature you want. This will bypass the thermocouple and start the gas flow to the pilot, so don't dawdle here, move your lighter back to the pilot burner. It should light immediately and stay lit.
When the thermocouple comes up to temperature (30 seconds or so after you light the pilot), the main burner will light and you're off and running.
Again, note that the gas starts flowing to the pilot as soon as you turn the knob to a temperature past the "pilot" setting - whether or not the pilot is lit. So don't leave it there without lighting the pilot!