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