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