Create 2 - Lower-case String.py
This commit is contained in:
parent
ddf30ce83a
commit
7d43682bd6
10
11/a/2 - Lower-case String.py
Normal file
10
11/a/2 - Lower-case String.py
Normal 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
|
Loading…
Reference in New Issue
Block a user