It isn’t difficult, and it works with Pepsi too. It’s based on the fact that a can of the diet drink is slightly lighter than a can of the regular drink.
Regular Coca-Cola is sweetened with sugar (sucrose) or corn sweeteners, which are other sugars, usually fructose, maltose and/or glucose. Diet Coke, on the other hand, is sweetened with aspartame, an artificial sweetener.
Gram for gram, aspartame is 150 to 200 times sweeter than sucrose, so only a tiny amount of it is needed to produce the same sweetness as in the sugared product. While the amount of sugar in the regular drink is 2 or 3 percent, there are only a few hundredths of a percent of aspartame in the diet drink.
Therefore, a can of the diet drink is very slightly lighter in weight.
Your buddy can’t tell the difference just by hefting the two cans. But if he fills a sink with water and places the unopened cans in it, the diet can will float higher in the water than the regular can, which might even sink.
I can tell a can of diet Coke from a can of regular Coke without opening them or reading their labels.