Level 10 : Which of the following is the correct way to create a list in Python?

Author: bhavani | Tags: list | 1859+ Python FAQs | Share
version | copy | introduction-to-threads | arithmetic-expression | bitwise-operator | datetime.date,-datetime.time,-datetime.datetime | binary-operation | list-mutation | multiple-inheritance | list-slicing | match | dictionary | class | walking-through-directories-using-os.walk() | round-function | thread | type-conversion-and-casting | bitwise-operator | typeerror | collections | reading-and-writing-files | condition | generators | default-arguments | stack | data-structure | loop | directory-operations | type-conversion | error-handling | __all__-attribute | swapping | control-flow | list-comprehension | docstring | regular-expression | data-type-conversions | lists | constructor | asyncio | method-overloading | while-and-for-loop | sys | floating-point-precision | string-iteration | boolean | generators-in-python | time-series-with-pandas | exponentiation | async | function-and-scope | unit-testing | benefit | yield | file_handling | with-statement | sets | dataframe-and-series-objects | joining-and-merging-dataframes | matplotlib | math-copysign | string-formatting | data-structures | multiple-except-blocks | slice | integers | boolean-and-non-boolean | type-conversion | thread-synchronization | map-function | using-lists-as-stacks | dictionaries | max-min | assert | built-in-function | string-method | introduction-to-multiprocessing | filtering-and-indexing | built-in | sum() | set | compute | string-methods | iterators | conditional-statements | dictionary-methods | comprehension | module | file-handling | destructor | data-structures-in-python | heap-memory | functional-programming | matrix-list-comprehension | descriptors | loop-control | assignment-operators | logical-operators | working-with-binary-files-(rb,-wb) | choice | list-operation | append | arbitrary-arguments-(*args,-**kwargs) | error | static-method | loop-control-statements | head-and-tail | methods | version-check | mapping-function | multiprocessing | logical-operator | memory-management | string-method | __future__ | literal-characters-and-special-characters | string | id-function | package-management | working-with-temporary-files-using-tempfile | booleans | using-map()-for-transformations | why-use-multiprocessing-over-threading?-(gil) | print | join | random-function | operator-or | array | expand-tab | thread-safe-data-structures-(queue.queue) | intering | math | basic | functions | pep | string-concatenation | list-methods-and-slicing | namedtuple | pass | formatting-with-strftime | encoding | software-design | inheritance | split | built-in-modules | class-and-instance-variable | memory | list-indexing | working-with-dates-and-times | min-max-function | print-statement | aggregating-data-with-functools.reduce() | python | sorted | __init_subclass__ | pickling--unpickling | list,-set,-and-dictionary-comprehensions | magic-method | sys-module | python-history | global-keyword | input | object-attribute | comparison | binary | postfix | indexing:-loc-vs-iloc | handling-missing-values-(fillna,-dropna) | call | filter-function | boolean-masking | attribute | anchors-(^,-$) | indexing | asyncio-module | operator-overloading | application | built-in-function | exception-handling | sorting-and-ranking | mathematical-function | opening-files-(open()) | class-and-inheritance | escape-operator | access-modifier | matrix | single-inheritance | precedence-and-associativity | update | syntax-error | lambda | touples | return-statement | exception-handling | while-else-loop | objects | oops | collection | parameter | command-line-parsing | loops | assignment-operator | nested-loop | arithmetic-operation | center | raise | type_conversion | string-slicing | advanced-file-operations | syntaxerror | classes | iterator | logical-operator | encapsulation | class-decorators | writing:-write(),-writelines() | class-and-object | logical-operation | bitwise | higher-order-function | staticmethod | counter | shallow-copy | regex | keyword | inherit | list-vs-tuple | conversion | multiple-inheritance | installation | invalid-list | using-else-and-finally | virtual-environment | creating-custom-modules | formal-and-actual-parameter | zip | else | python_version | regular-expressions | immutable-data-type | else-statement | data-structure | tuples | operations | datatype | control-statement | filter | statement | datetime | iterable | list-method | parsing-with-strptime | round | numpy | while-loops | input-function | recurssion | context-manager | turtle | threading | decimal | oop | default-mutable-argument | while-loop | recursion | exception | data-type | managing-directories-with-os-and-shutil | working-with-file-paths | dicts | string-slicing | file | decorator | syntax-error | numeric | list-comprehensions | tuple-unpacking | method | python-operators | reading:-read(),-readline(),-readlines() | string-formatting | data_structure | membership-operators-(in,-not-in) | factorial-function | complex-number | python-syntax-and-structure | sum-function | for | multithreading | odd-number | design-principle | virtual-environment | operators | list | python-repl | reading-and-writing-large-files-efficiently | creating-and-starting-threads | data-type | lambda-function | random | counter-function | operand | goto-function | using-join()-and-is_alive()-methods | rollback | def | import-method | syntax | functional-programming | using-os-and-pathlib-modules | input-function | operator | using-the-threading-module | deep-copy | interpreter | fabs-function | set-operation | conditional-statement | debugging | complex | overflow | function-argument | raise-statement | range | namespace | conditional-statement | integer | difference-between-threads-and-processes | tuple-methods | control-flow | zip-function | data-types | lambdas | function | slicing | defining-functions | identity-operator | frozenset | generator | global | pseudocode | dictionary-comprehensions | format | scientific-notation | mathematics | python-django | floats | library | mysql | string-manipulation | pandas | using-assertions-(assertequal,-assertraises) | expression | init | sorting | min-function | strings | implementation | mutable | global-variable | tuple | identity-operator | python-module | identity-operators-(is,-is-not) | identifier | zfill-function | using-yield-in-functions | name-mangling | immutability | precedence | key-value-pairs | enumerate() | file-handling | list-comprehension | quantifiers-(*,-+,-?,-{}) | lambda-functions | global-variable | indentation | feature | int | variable | polymorphism | introduction-to-python | gil | test-discovery | operator-and | overriding-methods | error-handling | comment | list-join ...