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