Answer the question
In order to leave comments, you need to log in
I am writing a bot in Python, there was a problem - Invalid syntax, what should I do?
I am writing a bot in Python, in the line
'responses': ['Bla', 'Bla', 'etc:],
the program gives an error Invalid syntax, in the Python shell the left quote in responses is highlighted in red, what should I do about it?
Part of the code looks like this:
' hello': {
'examples': ['Hello', 'Hello', 'Good afternoon']
'responses' : ['Well hello', 'hello']
Answer the question
In order to leave comments, you need to log in
After 'examples': ['Hello', 'Hello', 'Good afternoon'] you need to put a comma, and so after each key:value element, except for the last one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question