2015-04-29 76 views

回答

2

你只是迭代你的字典,並在鍵上進行模式匹配。

for key in dict: 
    if re.match(r'npi[0-9]+', key): 
     print(dict[key])