设为首页 加入收藏

TOP

Python upper() 函数 转换为大写字母
2015-02-13 18:23:48 来源: 作者: 【 】 浏览:37
Tags:Python upper 函数 转换 大写 字母

Python函数:upper()


1:作用:字符串中的小写字母转为大写字母。


2:语法:string.upper()


3:返回值:返回被转为大写字母的字符串


4:实例


>>> from string import upper
>>> s = "Hello Good Boy?Linuxidc 123456"
>>> print s.upper()
HELLO GOOD BOY?LINUXIDC 123456


--------------------------------------分割线 --------------------------------------


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Python len() 函数 获取字符串长度 下一篇jQuery事件绑定失败问题排查

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: