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


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

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