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

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