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

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