Python syntax of arrays and dictionaries