Level 1 : What is the output of the following code?


a = ['xy','yz']
for i in a :
    a.append(i.upper())
 print(a)

Author: SarojiniD | Tags: loop | 1736+ Python FAQs | Share
pep | yield | return-statement | list-method | split | python-repl | virtual-environment | iterable | call | method | string-iteration | min-function | math | sys | update | input | immutability | format | fabs-function | objects | memory-management | data-structure | while-else-loop | __init_subclass__ | math-copysign | round-function | print | pseudocode | name-mangling | operations | pickling-&-unpickling | built-in-function | decorator | bitwise-operator | slice | object-attribute | string-method | async | design-principle | docstring | head-and-tail | global-variable | random-function | enumerate() | list-comprehension | append | deep-copy | file_handling | nested-loop | staticmethod | filter | command-line-parsing | python_version | while-loop | context-manager | zip | choice | postfix | syntax-error | binary | python | syntaxerror | oop | swapping | decimal | counter | namedtuple | constructor | error | random | exponentiation | immutable-data-type | file | dicts | matplotlib | matrix | sorted | string-formatting | operator-and | condition | map-function | inherit | data-type | oops | global-variable | string-concatenation | list-indexing | sorting | assert | __future__ | stack | formal-and-actual-parameter | function | factorial-function | loop | scientific-notation | keyword | control-flow | destructor | parameter | generators-in-python | polymorphism | sum-function | python-history | conditional-statement | lists | mysql | typeerror | class | list-comprehension | attribute | dictionary | operator-or | join | matrix-list-comprehension | multiprocessing | floating-point-precision | list-operation | asyncio | identifier | touples | feature | while-and-for-loop | package-management | counter-function | multiple-inheritance | static-method | comprehension | filter-function | string-formatting | def | application | identity-operator | precedence-and-associativity | multithreading | regular-expression | version | complex-number | data-type | __all__-attribute | data_structure | arithmetic-operation | threading | data-structure | expression | module | heap-memory | gil | mathematical-function | library | string-manipulation | exception | turtle | comment | access-modifier | logical-operator | operators | functional-programming | compute | raise | frozenset | virtual-environment | comparison | bitwise | numeric | numpy | expand-tab | odd-number | binary-operation | mutable | dictionaries | goto-function | rollback | list-vs-tuple | import-method | conditional-statement | thread | indentation | type_conversion | id-function | python-module | logical-operator | input-function | recurssion | memory | loops | asyncio-module | center | collection | collections | string-method | list-mutation | bitwise-operator | zip-function | version-check | regex | function-argument | exception-handling | else-statement | tuple-unpacking | generators | operator | type-conversion | descriptors | data-structures | error-handling | installation | max-min | control-flow | class-and-inheritance | conversion | encapsulation | variable | lambda-function | python-django | software-design | built-in | basic | iterator | file-handling | datatype | statement | file-handling | list-slicing | datetime | classes | lambda | logical-operation | string-slicing | input-function | global | integer | debugging | operator-overloading | loop-control | range | arithmetic-expression | operand | copy | round | benefit | sum() | default-mutable-argument | namespace | array | generator | identity-operator | int | syntax-error | overflow | function-and-scope | complex | exception-handling | mathematics | implementation | higher-order-function | for | magic-method | print-statement | type-conversion | class-and-instance-variable | methods | precedence | set-operation | boolean-and-non-boolean | inheritance | slicing | tuple | global-keyword | set | built-in-function | sys-module | with-statement | syntax | assignment-operator | shallow-copy | class-and-object | boolean | init | pandas | string | control-statement | list | recursion | escape-operator | indexing | interpreter | zfill-function | mapping-function | match | encoding | min-max-function | invalid-list | lambdas | string-slicing | list-join | functions ...