Level 1 : What will be the output of the following Python code snippet?


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

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