File size: 297 Bytes
5857a49
 
51b05b5
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import re

def check_sentence(sentence):
    # Define the pattern for the sentence starting with 'a-b-c' and ending with 'x-y-z'
    pattern = r'^a-b-c.*x-y-z$'
    # Use regular expression to match the pattern
    if re.match(pattern, sentence):
        return True
    else:
        return False