Create 2 - Lower-case String.py

This commit is contained in:
Lukas Baumann 2021-02-18 09:21:27 +01:00 committed by GitHub
parent ddf30ce83a
commit 7d43682bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,10 @@
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