Swift append an array when it's been declared as Any
Since myDictionary values are declared as Any, you could have anything (or even nothing) assigned at "scores", so you need to safe-cast the value in to a variable first and then reassign it.

I don't know about Python, but Swift doesn't check dictionary values at compile time.