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


x = 'abcd'
for i in x:
    print(i.upper())

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