Level 9 : Which type of copy is shown in the following python code?


l1=[[10, 20], [30, 40], [50, 60]]
ls=list(l1)
ls
[[10, 20], [30, 40], [50, 60]]

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