Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Python Code
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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:
Pythonist 2 → pYTHONIST 2

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
def swap_case(s):
return s.swapcase()

if __name__ == '__main__':
s = input()
result = swap_case(s)
print(result)