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