P22314 [HackerRank] Swap case
普及-
题目描述

You are given a string and your task is to swap cases. In other words, convert all lowercase letters to uppercase letters and vice versa.

For Example:

Www.HackerRank.com → wWW.hACKERrANK.COM
Pythonist 2 → pYTHONIST 2

Function Description

Complete the swap_case function in the editor below.

swap_case has the following parameters:

string s: the string to modify

Returns

string: the modified string

Input Format

A single line containing a string $\boldsymbol{\mathrm{~s~}}$.

Constraints

$0<len(s)\leq1000$

Sample Input 0
HackerRank.com presents "Pythonist 2".

Sample Output 0
hACKERrANK.COM PRESENTS "pYTHONIST 2".

输入格式

见题面

输出格式

见题面

样例输入
HackerRank.com presents "Pythonist 2".
样例输出
hACKERrANK.COM PRESENTS "pYTHONIST 2".