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


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

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