Level 9 : Which of the following will cause a MemoryError?


a = 'a' * (10**10)

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