Question: 
Write a function to check for a number at the end of a string.


Model's Code:
def end_num(s):
    return s[-1].isdigit() if s else False



Sample Correct Code:
import re
def end_num(string):
    text = re.compile(r".*[0-9]$")
    if text.match(string):
        return True
    else:
        return False


Asserts:
assert end_num('abcdef')==False
assert end_num('abcdef7')==True
assert end_num('abc')==False


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 913 of 974: 703/913 (76.99890470974809%): success