Run
import re str = 'Python is a programming language.' # Search using regex x = re.search('^programming', str) if(x!=None): print('The line starts with \'programming\'.') else: print('The line does not start with \'programming\'.')
Output