We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Validating Credit Card Numbers
Validating Credit Card Numbers
Sort by
recency
|
465 Discussions
|
Please Login in order to post a comment
Test case 3 is failed and i am not getting the problem where is : This is my code:
import re
def check(s): #1check if no of digits are 16 or not after removing - if len(s.replace("-",""))==16: for i in s: if i=="-" or i.isdigit(): continue else: return "Invalid"
n=int(input()) for _ in range(n): s=input() result=check(s) print(result)