
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
isupper(), islower(), lower(), upper() in Python and their applications
In this article, we will learn about isupper(), islower() ,upper() , lower() function in Python 3.x. or earlier.
These are the functions that can be used on strings and related types. They are included in Python Standard Library.
All the functions accept no arguments. The isupper() & islower() return boolean values whereas the upper() & lower() function returns strings either in uppercase or lowercase.
Now let’s see the implementation using an example
Example
string = 'tutorialspoint' # checking for uppercase characters print(string.isupper()) # checking for lowercase characters print(string.islower()) # convert to uppercase characters print(string.upper()) # convert to lowercase characters print(string.lower())
Output
False True TUTORIALSPOINT tutorialspoint
Explanation
If any parameter is passed error is raised by the interpreter. As observed from the output that all alphabets are converted to the desired case. In case the string contains any integer or symbolic character no change is observed.
Conclusion
In this article, we learnt about isupper(), islower() , lower() & upper() functions in Python 3.x. Or earlier
- Related Articles
- Isupper() and Islower() and their application in C++
- Convert vowels from upper to lower or lower to upper using C program
- Count upper and lower case characters without using inbuilt functions in Python program
- Sum of upper triangle and lower triangle in C++
- Alternate Lower Upper String Sort in C++
- Swap Upper diagonal with Lower in C++
- Python program to count upper and lower case characters without using inbuilt functions
- Digital Circuits and Their Applications
- Upper bound and Lower bound for non increasing vector in C++
- What are neutralisation and their applications?
- Upper or lower elements count in an array in JavaScript
- Java program to count upper and lower case characters in a given string
- C# program to count upper and lower case characters in a given string
- Portable applications in Cloud and their barriers in C++
- Different Types of Transformers and Their Applications
