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