Curly brackets error

I’m trying to follow this:


And when I c+ p I get the error saying >>Error: “{” expected<<

Anyone shed some light on it for me please? :slight_smile:

are you using Dynamo 2.x ? If so,use square brackets instead.

a = [ 1 , 2 , 9]

also regarding the function you are defining, you are missing the “{”

See below for an example



As @salvatoredragotta has pointed out { } was replaced by [ ], however contrary to the documentation while defining functions { } was always required along with a return.
In a current version, it would be something like this

1 Like

Thanks guys!

I’d already replaced the [ ] on the lists but it was telling me I needed {

So if I understand this; you need curly brackets around the output? Is that right?

Also, why does the } go on a new line and not right after the output?
It lets me put the { on the same line as the output.