709-To-Lower-Case
Sat 17 May 2025
https://leetcode.com/problems/to-lower-case
import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
def toLowerCase(self, str: str) -> str:
return ''.join(chr(ord(c) + 32) if 'A' <= c <= 'Z' else c for c in str)
new Solution().toLowerCase()
Score: 5
Category: leetcode