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


print('Ab!2'.swapcase())

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