I heard that you can keep them in complete darkness for 2 or 3 days, turn the lights back on and the males will show sex very quickly.
mmm, never heard that one but it is easy enough to test.
I've read several times that a 60-100x lope and a discerning eye can determine sex early.
Here is a bit of info you may find useful:
Male vs. female cannabis: How to determine the sex of your plant
Trevor Hennings February 11, 2020
In the world of plants, reproduction can happen in a variety of ways. Monoecious plants produce two different types of flowers on the same plant, and hermaphrodite plants grow single flowers that have both male and female reproductive organs.
Cannabis is a dioecious plant, meaning male or female reproductive organs appear on different plants.
With cannabis, females are usually isolated away from males—introducing males into a garden will result in pollination, causing females to create seeds.
This is important for a breeder to achieve new genetics, but most growers remove the males to allow females to produce seedless buds, also called sinsemilla. These are the resinous buds that appear on the store shelf; they all come from female plants.
Female cannabis pre-flowers grow as tiny bracts with hair-like stigma peeking out. Male plants produce small, round balls at the nodes.
Cannabis plants show their sex by what grows in between their nodes (where leaves and branches extend from the stalk). Pollen sacs will develop on a male plant to spread seeds and stigma will develop on a female to catch pollen. You can see these differences weeks before they actually start serving their purposes in the reproduction cycle. These are known as “pre-flowers.”
Pre-flowers begin to develop four weeks into growth, but they may take a little longer depending on how quickly the sprouting phase occurs. By the sixth week, you should be able to find the pre-flowers and confidently determine the sex of your plant.
Pre-flowers can initially be extremely small and hard to identify with the naked eye, but you can use a magnifying glass to get a better look. Examine the nodes of the plant and look for either the early growth of small sacs on a male, or two bracts on a female, which will eventually produce the hair-like stigma.
Though there are other methods to determine what sex the plant is, examining pre-flower formation is the most reliable.
https://www.leafly.com/news/growing/sexing-marijuana-plants