TypeError: list indices must be integers or slices, not str

Don’t use two $ signs. They mean interpret this as code rather than this is a variable.