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


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

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