Silver Library

To lower case - python 본문

Face the fear, build the future/Leetcode

To lower case - python

Silver Archmage 2022. 4. 7. 22:36

First attempt:

Unless the problem provide number to its array value, use 'method' before start thinking it from low level language. 

class Solution:
    def toLowerCase(self, s: str) -> str:
        ans=""
        for i in s:
            ans += i.lower()
        return ans
        
        
        
    '''
        UpperCase = str(s)
        LowerCase = u
        
        converter = UpperCase < LowerCase
        
        if (Converter < s):
            return u
        else:
            return s
      '''

 

'Face the fear, build the future > Leetcode' 카테고리의 다른 글

To lower case - python  (0) 2022.04.07
Two Sum - Note  (0) 2022.03.25
Finally...  (0) 2022.03.17
오랜만의 공개글.  (0) 2022.03.12
Types of algorithm  (0) 2022.02.14
10869, 2588 사칙연산 - Python [특이사항]  (0) 2021.12.26
0 Comments
댓글쓰기 폼