Demo entry 6716732

ipython luhn

   

Submitted by anonymous on Feb 21, 2018 at 10:38
Language: Python 3. Code size: 412 Bytes.

In [1]: import luhn

In [2]: for n in range(100):
   ...:     ccnum = "{prefix}{n:02d}{suffix}".format(prefix="531533", suffix="34567890", n=n)
   ...:     if luhn.verify(ccnum):
   ...:         print(ccnum)
   ...:         
5315330134567890
5315331934567890
5315332734567890
5315333534567890
5315334334567890
5315335034567890
5315336834567890
5315337634567890
5315338434567890
5315339234567890

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).