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