S6_2: Fix syntax errors in Keywords check, change message slightly
The recent change to S6_2.py has some syntax errors. This MR fixes those, and I also made a small change to make error message a bit clearer.
I have tested the changes locally with a test case and the script runs correctly.