D
D
Daniel_ill2020-05-31 14:30:40
Python
Daniel_ill, 2020-05-31 14:30:40

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

2 answer(s)
R
Rais, 2020-05-31
@Daniil_ill

After 'examples': ['Hello', 'Hello', 'Good afternoon'] you need to put a comma, and so after each key:value element, except for the last one.

M
milssky, 2020-05-31
@milssky

What to do - open any book / site for beginners on python and get acquainted with the syntax of the language.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question