Python code to lowercase the character without using a function
# Python program to lowercase the character
# without using a function
st = input('Type a string: ')
out = ''
for n in st:
if n not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ':
out = out + n
else:
k = ord(n)
l = k + 32
out = out + chr(l)
print('----->', out)
Output
First run:
Type a string: Hello world!
-----> hello world!
Second run:
Type a string: HHJHJHFF$%*@#$
-----> hhjhjhff$%*@#$
Third run:
Type a string: abcds14524425way
-----> abcds14524425way
Python code to lowercase the character without using a function
Output
need an explanation for this answer? contact us directly to get an explanation for this answer