if condition for capital letters string in python code example Example: python method to check for uppercase character a="DEMO" print(a.isupper())