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