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