csc-python-solutions/11/a/2 - Lower-case String.py

11 lines
214 B
Python
Raw Normal View History

2021-02-18 08:21:27 +00:00
def lowerChar(char):
if 65 <= ord(char) <= 90:
return chr(ord(char)+32)
return char
def lowerString(string):
out = ""
for i in range(len(string)):
out += lowerChar(string[i])
return out