Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aafb7f4

Browse files
Create SwapCase.py
1 parent 5308a68 commit aafb7f4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎Training/SwapCase.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'''
2+
3+
SwapCase character of the string
4+
5+
'''
6+
7+
s=""
8+
a=input()
9+
for j in range(len(a)):
10+
i=a[j]
11+
if(i>='a' and i<='z'):
12+
s+=i.upper()
13+
elif(i>='A' and i<='Z'):
14+
s+=i.lower()
15+
else:
16+
s+=i
17+
print(s)
18+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /