Python

Python Menu

Python

Python String swapcase() - Definition, Syntax, Parameters, Examples

Definition

The swapcase() method returns a string where all the upper case letters are lower case and vice versa.

Syntax

string.swapcase()

Parameters

No Parameters.

Examples:

testStr = "Welcome to the Python tutorials" x = testStr.swapcase() print(x)

Introduction

Python Basics

Python Advance

Data Science Python Tutorials

Python Functions and Methods