how to check case of string in python

Solutions on MaxInterview for how to check case of string in python by the best coders in the world

showing results for - "how to check case of string in python"
Erika
04 Nov 2018
1Call str. islower() with str as a string to determine if str is all lowercase. Call str. isupper() to determine if str is all uppercase.
Dilys
29 Mar 2020
1string = 'iAmABoy'
2
3for letter in string:
4    print(letter)
5    if letter.isupper():
6        print('yes')
7        break
8        
9o/p:-
10  i
11  A
12  yes
13  
14happy coding ^^