Level 9 : What will be the output of the following code?


list = ["balaji", "lakshmi"]
for i in list:
        list.append(i.upper())
print(list)

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