Python Practice › String Programs › Program 101

Swap case

EasyString Programs · 101 of 106

Write a Python program to swap upper and lower case.

Advertisement
Input
"Learning Python"
Output
lEARNING pYTHON

Approach

  1. swapcase().

Solution

Python
print("Learning Python".swapcase())
Output
lEARNING pYTHON

Learn the concept

New to this topic? Read the lesson, then come back.

More string programs

← All 106 String Programs

Leave a Comment