Churros
Churros

Reputation: 11

Strings being called from dictionaries are invalid syntax? - Python 3

An example:

TheDictionary = {
     'Churros' : ['Using','Stack','Overflow']
     'Python' : ['A','Coding','Language']
     }

The quotation mark that ends the name 'Python' is apparently invalid syntax. Help?

Upvotes: 1

Views: 81

Answers (1)

saintmarina
saintmarina

Reputation: 297

you a missing a comma. Also in Python, Upper Camel case is reserved for Class names. Find fixed code below:

the_dictionary = {
  'Churros' : ['Using','Stack','Overflow'],
  'Python' : ['A','Coding','Language']
}

Upvotes: 2

Related Questions