您的位置:首页 > 编程语言 > Python开发

python之函数用法isupper()

2015-11-07 22:47 711 查看
# -*- coding: utf-8 -*-
#python 27
#xiaodeng
#python之函数用法isupper()
#http://www.runoob.com/python/att-string-isupper.html

#isupper()
#说明:检测字符串中所有的字母是否都为大写
'''
isupper(...)
S.isupper() -> bool

Return True if all cased characters in S are uppercase and there is
at least one cased character in S, False otherwise.
'''

str = "THIS is string example....wow!!!"
print str.isupper()#False

str = "NAME"
print str.isupper()#True
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: