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