r/pythonhelp • • Jun 10 '20

Need help with this python code not sure whats wrong with line 229

Post image
2 Upvotes

3 comments sorted by

4

u/Weanier Jun 10 '20

I think you need a second parentheses on line 228.

1

u/_tombl_ Jun 10 '20

You are missing a ')' but your main problem there is that susan is a dictionary not a function, so it is not callable

Your code probably wants to be more like

people.append(susan)
people.append({
  'first': 'Bill',
  'last': 'Gates'
})

Incidentally you can initialise a dict with the keys already filled e.g.

john = {
  'first': 'John',
  'last': 'Smith'
}