qingxin = 520 #qingxin为字符串
qingxin.isalnum() 所有字符都是数字或者字母,为真返回 Ture,否则返回 False。
qingxin.isalpha() 所有字符都是字母,为真返回 Ture,否则返回 False。
qingxin.isdigit() 所有字符都是数字,为真返回 Ture,否则返回 False。
qingxin.islower() 所有字符都是小写,为真返回 Ture,否则返回 False。
qingxin.isupper() 所有字符都是大写,为真返回 Ture,否则返回 False。
qingxin.istitle() 所有单词都是首字母大写,为真返回 Ture,否则返回 False。
qingxin.isspace() 所有字符都是空白字符,为真返回 Ture,否则返回 False。
比如
>>> wangxi = "I LOVE WANGXI"
>>> wangxi.isupper()
True
>>>