9 lines
224 B
Python
9 lines
224 B
Python
import re
|
|
def match_num(string):
|
|
text = re.compile(r"^5")
|
|
if text.match(string):
|
|
return True
|
|
else:
|
|
return False
|
|
print(match_num('5-2345861'))
|
|
print(match_num('6-2345861')) |