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