To Lower Case

theabbie

Abhishek Chaudhary

Posted on June 16, 2022

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()
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
theabbie
Abhishek Chaudhary

Posted on June 16, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Balance a Binary Search Tree
leetcode Balance a Binary Search Tree

June 19, 2022

Implement Stack using Queues
leetcode Implement Stack using Queues

June 16, 2022

Sum of Digits in Base K
leetcode Sum of Digits in Base K

June 16, 2022

Permutation Sequence
leetcode Permutation Sequence

June 16, 2022