[LeetCode]#709. To Lower Case
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: