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


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

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