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