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