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