Shorter lengths can easily be cut from this part with a pair of wire cutters, so there is no need to purchase shorter lengths. This part is therefore listed for all lengths of single row, angled, male header pins.
Pin spacing is 2.54mm (0.1″). Note the position of the plastic part relative to the bend in the pins. The plastic part is on PCB side of the bend.
A good source of these is eBay. Search for “1 row 40 pin male angled header arduino”