Swap Case Converter
More Details
🔄 Swap Case
Function: Write a function swap_case(s) that takes a string and returns it with all lowercase letters converted to uppercase and all uppercase letters converted to lowercase.
Input: A single string s (1 ≤ len(s) ≤ 1000)
Output: The modified string with swapped cases.
Example:
Input: HackerRank.com presents "Pythonist 2".
Output: hACKERrANK.COM PRESENTS "pYTHONIST 2".
Code