-
-
Notifications
You must be signed in to change notification settings - Fork 298
/
Copy path709.py
23 lines (23 loc) · 845 Bytes
/
709.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
__________________________________________________________________________________________________
sample 28 ms submission
class Solution:
def toLowerCase(self, st: str) -> str:
s = ''
for i in st:
if 'A' <= i <= 'Z':
s += chr(ord(i)+32)
else:
s+=i
return s
__________________________________________________________________________________________________
sample 12936 kb submission
class Solution:
def toLowerCase(self, str_input: str) -> str:
str_aux = str()
for i,char in enumerate(str_input):
if char.isupper():
str_aux+=char.lower()
else:
str_aux+=char;
return str_aux;
__________________________________________________________________________________________________