What they said!
Some additional comments. There are female headers that have grooves or ridges that make it easier to cut (e.g., with a thin saw) without sacrificing a pin position. I think the trick would be to look for the ones where the flat-part of the inserts are vertical instead of horizontal. IMO if going thru the trouble of rolling your own, minds as well pay a few extra pennies per pin to get gold-plated contacts. I show this above for both the female and male sides. As the guys above say you can readily find 2-position or 3-position female housings rather than breaking/chopping up a longer strip. As Leo says there are low-cost crimped contact housings so you don't need to solder. They might even have male crimped insert housings in multi-positions but I can't recall seeing them. In which case as shown you can simply use a male-to-male header to join 2 females (shown above with 3-position crimped females).
Sorry, I don't have any part numbers. I just grabbed a bunch of connector stuff out of my 2.54mm square-pin header stash - bought a lifetime supply of this stuff in the last century.