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.
Related Posts:
- What does “while True” mean in Python?
- syntaxerror: “unexpected character after line continuation character in python” math
- How do you express binary literals in Python?
- Can someone explain __all__ in Python?
- How to exit a loop in Python?
- How can I do a line break (line continuation) in Python?
- What does the /= operator mean in Python?
- What do >> and << mean in Python?
- Is there a difference between `continue` and `pass` in a for loop in python?
- What does `<>` mean in Python?
- What does the “at” (@) symbol do in Python?
- What is :: (double colon) in Python when subscripting sequences?
- What’s the u prefix in a Python string?
- Python def function: How do you specify the end of the function?
- No Multiline Lambda in Python: Why not?
- What does ** (double star/asterisk) and * (star/asterisk) do for parameters?
- Python integer incrementing with ++ [duplicate]
- What is the result of % in Python?
- What’s the meaning of “=>” (an arrow formed from equals & greater than) in JavaScript?
- IndentationError: unexpected indent error
- Putting a simple if-then-else statement on one line [duplicate]
- How can I do a line break (line continuation)?
- How do you comment out code in PowerShell?
- How do I break a string in YAML over multiple lines?
- What does ‘&’ do in a C++ declaration?
- syntaxerror: “unexpected character after line continuation character in python” math
- syntaxerror: “unexpected character after line continuation character in python” math
- `from … import` vs `import .` [duplicate]
- Tab space in Markdown
- syntax error when using command line in python
- In JavaScript is != same as !==
- What does ** (double star/asterisk) and * (star/asterisk) do for parameters?
- syntax error when using command line in python
- What Does This Mean in PHP -> or =>
- Comments in Markdown
- How do I pass multiple parameters into a function in PowerShell?
- Comments in Markdown
- What is the difference between syntax and semantics in programming languages?
- Python: SyntaxError: keyword can’t be an expression
- What do << or >>> in java mean?
- What is the Java ?: operator called and what does it do?
- How do I convert a float number to a whole number in JavaScript?
- hat does “static” mean in C?
- How to normalize a 2-dimensional numpy array in python less verbose?
- Ternary operator (?:) in Bash
- SyntaxError invalid token
- What is the difference between ‘/’ and ‘//’ when used for division?
- Is there a difference between x++ and ++x in java?
- Printing variables in Python 3.4
- What does the “@” symbol do in PowerShell?
- Static Semantics meaning?
- What does the `and` keyword mean in OCaml?
- text highlight in markdown
- Error “‘type’ object has no attribute ‘__getitem__'” when iterating over list[“a”,”b”,”c”]
- Inline for loop
- What does ‘wb’ mean in this code, using Python?
- What does @@variable mean in Ruby?
- Python def marked as invalid syntax
- How do you format an unsigned long long int using printf?
- What are those pipe symbols for in Ruby?
- bash: syntax error near unexpected token `(‘ – Python
- Prolog “or” operator, query
- Confusion between Python and Anaconda
- How to find which version of TensorFlow is installed in my system?
- Understanding the Python ‘with’ statement
- Python ‘If not’ syntax [duplicate]
- What is the maximum recursion depth in Python, and how to increase it?
- How to change the order of DataFrame columns?
- What does %s mean in a python format string?
- ImportError: No module named ‘tensorflow.python’
- How to access environment variable values
- python numpy ValueError: operands could not be broadcast together with shapes
- error: command ‘gcc’ failed with exit status 1 while installing eventlet
- Unzipping files in Python
- ValueError: all the input arrays must have same number of dimensions
- Get the data received in a Flask request
- Python function execution
- (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape
- What do I use for a max-heap implementation in Python?
- TypeError(“‘bool’ object is not iterable”,) when trying to return a Boolean
- Python – How to fix “ValueError: not enough values to unpack (expected 2, got 1)”
- Flask Template Not found
- Making a collatz program automate the boring stuff
- Running an outside program (executable) in Python?
- TypeError: ‘type’ object is not iterable – Iterating over object instances
- What is the difference between json.load() and json.loads() functions
- Viewing all defined variables
- Does JavaScript support array/list comprehensions like Python?
- Difference between two dates in Python
- ImportError: No module named win32com.client
- If statement for strings in python?
- How to create a numpy array of all True or all False?
- What is the quickest way to HTTP GET in Python?
- Replacing Pandas or Numpy Nan with a None to use with MysqlDB
- How do I merge lists in python? [duplicate]
- Python: What OS am I running on?
- TypeError: got multiple values for argument
- How can I recover the return value of a function passed to multiprocessing.Process?
- Python Remove last char from string and return it