To Lower Case

Given a string s, return the string after replacing every uppercase letter with the same lowercase letter.

 

Example 1:

Input: s = "Hello"
Output: "hello"

Example 2:

Input: s = "here"
Output: "here"

Example 3:

Input: s = "LOVELY"
Output: "lovely"

 

Constraints:

  • 1 <= s.length <= 100
  • s consists of printable ASCII characters.
SOLUTION:
class Solution:
    def toLowerCase(self, s: str) -> str:
        return s.lower()

Comments

Popular posts from this blog

Lazy Deletion in Heap: A Wrapper for Python heapq

Sliding Window GCD

Degree of an Array