[LeetCode]#709. To Lower Case

Fatboy Slim
1 min readApr 2, 2020

--

Environment: Python 3.7

Key technique: lower function

Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase.

Example 1:

Input: "Hello"
Output: "hello"

Example 2:

Input: "here"
Output: "here"

Example 3:

Input: "LOVELY"
Output: "lovely"

Solution:

class Solution:
def toLowerCase(self, str1):
ans=str1.lower()
return ans

Submitted result:

--

--

Fatboy Slim
Fatboy Slim

Written by Fatboy Slim

Interesting in any computer science.

No responses yet