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

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