how to un-capitalize string in python

You can un-capitalize a string in Python using the lower() method.

main.py
text = 'UN-CAPITALIZE ME'
uncapitalized_text = text.lower()
print(uncapitalized_text)  # Output: un-capitalize me
114 chars
4 lines

In the above code, the lower() method is applied to the text variable, which returns the lowercase version of the string, which is then assigned to the uncapitalized_text variable. Finally, the uncapitalized text is printed to the console using the print() function.

gistlibby LogSnag