
    Write a function to determine if a student's submitted answer in the language assessment module begins and ends with the same letter, which is crucial for evaluating responses in pattern recognition exercises. The function should help identify whether students have correctly followed the required response format in vocabulary exercises that specifically test for word patterns.
    

    
import re
regex = '^[a-z]$|^([a-z]).*\\1$'

def check_char(string):
    """
    Write a function to determine if a student's submitted answer in the language assessment module begins and ends with the same letter, which is crucial for evaluating responses in pattern recognition exercises. The function should help identify whether students have correctly followed the required response format in vocabulary exercises that specifically test for word patterns.
    

    """
import re
regex = '^[a-z]$|^([a-z]).*\\1$'

def check_char(string):
    """
    Write a function to determine if a student's submitted answer in the language assessment module begins and ends with the same letter, which is crucial for evaluating responses in pattern recognition exercises. The function should help identify whether students have correctly followed the required response format in vocabulary exercises that specifically test for word patterns.
    

    """
    if re.search(regex, string):
        return 'Valid'
    else:
        return 'Invalid'