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