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