Answers for "how to see if string contains substring lowercase or uppercase python"

0

how to see if string contains substring lowercase or uppercase python

a_string = "hello world"
all_lowercase = a_string.islower()

print(all_lowercase)

---------------------------------------------------

a_string = "HELLO WORLD"
all_uppercase = a_string.isupper()

print(all_uppercase)

---------------------------------------------------

a_string = "Hello World"
mixed_case = not a_string.islower() and not a_string.isupper()
Posted by: Guest on October-26-2021

Code answers related to "how to see if string contains substring lowercase or uppercase python"

Python Answers by Framework

Browse Popular Code Answers by Language