columnNames = {} defines an empty dict
columnNames = [] defines an empty list
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.
In addition to David’s answer here is how you usually iterate them:
# iterating over the items of a list
for item in someList:
print( item )
# iterating over the keys of a dict
for key in someDict:
print( key, someDict[key] )
# iterating over the key/value pairs of a dict
for ( key, value ) in someDict.items():
print( key, value )