Python function lower can be used to transform uppercase to lowercase, example:
>>> s = "HELLO"
>>> s = s.lower()
>>> s
'hello'
If we want to transform all letters to lowercase and uppercase the first letter, one can use the method capitalize() , example:
>>> s = 'HELLO WORLD'
>>> s.capitalize()
'Hello world'
Note that with the python framework django, the tag title can be used in a template to get similar results::
{{ "name"|title }}
References
Links | Site |
---|---|
lower | python doc |
Convert a Python list with strings all to lowercase or uppercase | stackoverflow |
Replace uppercase characters with lowercase+extra characters | stackoverflow |
How to replace uppercase with underscore? | stackoverflow |
How to lowercase a string in Python? | stackoverflow |
string capitalize() in Python | geeksforgeeks.org |
Make the first letter uppercase inside a django template | stackoverflow |