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