columnNames = {}
defines an emptydict
columnNames = []
defines an emptylist
These are fundamentally different types. A dict
is an associative array, a list
is a standard array with integral indices.
I recommend you consult your reference material to become more familiar with these two very important Python container types.