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