In a puppy the answer is not under the tail but on the belly: the male has a small opening a few centimetres behind...
In a puppy the answer is not under the tail but on the belly: the male has a small opening a few centimetres behind the navel, the female has nothing there and her vulva sits just below the anus. Readable from birth, in two seconds.