Disagree with everyone else.
You can't build up resistance to penicillin. However, the bugs that live in around your body can.
Penlac does not contain penicillin. It contains ciclopirox, which "may" have antifungal activity under some circumstances.
However, there is little evidence that nail varnish containing ciclopirox makes any difference to fungal nail infections.
It has tentative FDA approval. Painting it on your nails probably won't do you any harm. It remains to be seen whether it will help fix fungal nail infections.