We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5db241b commit 5c18501Copy full SHA for 5c18501
Problem Solving Scripts/CNPJ_Checker.py
@@ -70,9 +70,6 @@ def validateCNPJ(userCNPJ):
70
userCNPJ = re.sub("[^0-9]", "", userCNPJ)
71
logThis(userCNPJ)
72
73
- # pick the last 2 digits of userCNPJ.
74
- last2digits = userCNPJ[-2:]
75
-
76
# Check length of CNPJ
77
if len(userCNPJ) != 14:
78
validCNPJ = False
@@ -86,7 +83,7 @@ def validateCNPJ(userCNPJ):
86
83
sumOfDigits = sum(int(i) for i in userCNPJList)
87
84
sumOfDigits = str(sumOfDigits)
88
85
89
- # Get first nine digits from userCNPJ
+ # Get first 12 digits from userCNPJ
90
firstTwelveDigits = userCNPJList[0:12]
91
92
# Let's find the first last digit with this operation.
0 commit comments