Skip to content

Commit bacbc8f

Browse files
Merge pull request geekcomputers#351 from Imperavam/fix-credit-card
Update Credit_Card_Validator.py
2 parents bdf7c75 + 3b5d219 commit bacbc8f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Credit_Card_Validator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ def company(self):
1010
comp =None
1111
if str(self.card_no).startswith('4'):
1212
comp = 'Visa Card'
13+
elif str(self.card_no).startswith(('50', '67', '58','63',)):
14+
comp = 'Maestro Card'
1315
elif str(self.card_no).startswith('5'):
1416
comp = 'Master Card'
1517
elif str(self.card_no).startswith('37'):
@@ -18,8 +20,6 @@ def company(self):
1820
comp = 'Discover Card'
1921
elif str(self.card_no).startswith('35'):
2022
comp = 'JCB Card'
21-
elif str(self.card_no).startswith('50' or '67'or '58'or'63'):
22-
comp = 'Maestro Card'
2323
elif str(self.card_no).startswith('7'):
2424
comp = 'Gasoline Card'
2525

0 commit comments

Comments
 (0)