how to change a string to small letter in python

my_str = "Hello World"
print(my_str) # outputs "hello world" on the terminal

Here is what the above code is Doing:
1. We create a string variable called my_str and assign it the value “Hello World”.
2. We call the lower() method on my_str.
3. We print my_str to the terminal.

Note that the lower() method doesn’t change the value of my_str. It just returns a lowercase version of my_str.

To actually change the value of my_str, we need to assign the return value of lower() to my_str: