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