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