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