re.search (r'\$\s*$', text, re.MULTILINE): strength += 0.05 # Function definition operator. if ':=' in text: strength += 0.02 return strength PK