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