Level 10 : What will be the output of the following code?


myArray = array.array('i', [1, 2, 3])
   myArray.append(4)
   print(myArray)

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