
import re

card_list=[]

while(True):
    
    
    card_no=input("card number")
#    card_number=card_no.split()
    if not card_no:
        break
    else:
        card_list.append(card_no)
    
for item in card_list:
    if re.match(r'[456][0-9]{3}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}',item):
        print("True")
    else:
        print("false")
596095229e365776a93b27f59768eb49cee9cf70
<mask token>

<mask token>
while True:
    card_no = input('card number')
    if not card_no:
        break
    else:
        card_list.append(card_no)
for item in card_list:
    if re.match('[456][0-9]{3}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}', item):
        print('True')
    else:
        print('false')

<mask token>
card_list = []
while True:
    card_no = input('card number')
    if not card_no:
        break
    else:
        card_list.append(card_no)
for item in card_list:
    if re.match('[456][0-9]{3}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}', item):
        print('True')
    else:
        print('false')

import re
card_list = []
while True:
    card_no = input('card number')
    if not card_no:
        break
    else:
        card_list.append(card_no)
for item in card_list:
    if re.match('[456][0-9]{3}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}', item):
        print('True')
    else:
        print('false')


import re

card_list=[]

while(True):
    
    
    card_no=input("card number")
#    card_number=card_no.split()
    if not card_no:
        break
    else:
        card_list.append(card_no)
    
for item in card_list:
    if re.match(r'[456][0-9]{3}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}',item):
        print("True")
    else:
        print("false")