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