Min_max_digits_list. #initialize the value of min_digits & max_digitsĪvailable_length=number_length.split(',') Reader = csv.DictReader(open("card_data.csv"))Ĭard_number = input("Enter the card No: ")Ĭard_number_list_reverse=card_number_list You can use my code for card validation it is 100% dynamic because of the card structure is stored in CSV file, so it is easy to update here is the code on GitHub profile, python file link, code explanation file link and CSV for datafile link Print(format("Card Number", "20s"), ("Valid / Invalid")) If num = "4" or num = "5" or num = "6" or (num = "3" and num = "7"):įilename = input("What is the name of your input file? ") Number = eval(strNumber) + eval(strNumber) Here's what my output is supposed to be Card Number Valid / InvalidĪnd here is the code.
0 Comments
Leave a Reply. |