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