lower Examples

The general syntax for this method is:

string_name.lower()

This method returns a copy of string_name with all uppercase letters converted to lowercase. It leaves non-alphabetic characters alone.

string_name can be a literal string, like 'Hello', or it can be a variable that points to a string value.

1
2
3
4
print("LaunchCode".lower())

word = "Some Title With Non-letters!"
print(word.lower())

Output

launchcode
some title with non-letters!

upper Examples

The general syntax for this method is:

string_name.upper()

This method returns a copy of string_name with all lowercase letters converted to uppercase. It leaves non-alphabetic characters alone.

string_name can be a literal string, like 'Hello', or it can be a variable that points to a string value.

Example

1
2
3
4
email = username@some_site.org

print("LaunchCode".upper())
print(email.upper())

Output

LAUNCHCODE
[email protected]_SITE.ORG