python is capital code example

Example 1: python is uppercase

# checking for uppercase characters
string = 'GEEKSFORGEEKS'
print(string.isupper())		# True
  
string = 'GeeksforGeeks'	
print(string.isupper())		# False

Example 2: how to check case of string in python

string = 'iAmABoy'

for letter in string:
    print(letter)
    if letter.isupper():
        print('yes')
        break
        
o/p:-
  i
  A
  yes
  
happy coding ^^

Example 3: 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 4: how do you change a string to only uppercase in python

original = Hello, World!

#both of these work
upper = original.upper()
upper = upper(original)