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

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