You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
224 B
Python
9 lines
224 B
Python
5 years ago
|
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'))
|