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