Level 1 : What will be the output of the following Python function


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

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