isupper() 判断是否全是大写
islower() 判断是否全是小写
istitle() 判断首字母是否大写,其余的是否小写
(以上全是python的函数,具体用法如下)
str_1 = "HELLO WORLD" #全部是大写
str_2 = "Hello WORLD" #大小写混合
str_3 = "Hello World" # 单词首字母大写
str_4 = "hello world" # 全部是小写
str_1.isupper()
True
str_2.isupper()
False
str_1.islower()
False
str_4.islower()
True
str_1.istitle()
False
str_3.istitle()
True