check if char is uppercase python code example
Example 1: python convert string to lowercase
# By Alan W. Smith and Petar Ivanov
s = "Kilometer"
print(s.lower())
Example 2: how to check case of string in python
Call str. islower() with str as a string to determine if str is all lowercase. Call str. isupper() to determine if str is all uppercase.
Example 3: python method to check for uppercase character
a="DEMO"
print(a.isupper())
Example 4: function in oythin test if letter is capital
string.isupper() # returns True or False, only returns true if all characters in string are Capiral