This is a male, the female yellow markings are less prominent.
Three years ago when visiting the Isles-de-la-Madeleine, we were fortunate to see a related butterfly (Short-tailed Swallowtail- Papilio brevicauda) that to all intents and purposes looks just like the Black Swallowtail but with rather shorter “tails”, hence its name. This species is not common and is found almost exclusively on the shorelines of the Gulf of St-Lawrence and associated islands, where it can find Scotch lovage (Ligusticum scoticum) growing with related plants of the parsley family. Because of the winds that are string by the sea this species is an especially strong flyer.
Beautiful!!