python中改变字母大小写的函数upper()和lower()
来源:互联网 发布:郑州seo公司hncxnet 编辑:程序博客网 时间:2024/06/04 19:56
今天学到map函数时写一个例子,看到了没接触过的upper函数
a = ‘hello’
a.upper()
print(a)==》‘HELLO’
自己写的例子如下:
# coding:utf-8def normalize(name): return name[0].upper()+name[1:].lower()L1=['adam','LISA','barT']result=list(map(normalize,L1))print(result)
输出结果是:Adam Lisa Bart
阅读全文
0 0
- python中改变字母大小写的函数upper()和lower()
- Python对字母字符(串)中大小写转换函数--upper() 和 lower()
- Python对字母字符(串)中大小写转换函数--upper() 和 lower()
- 对于BST(二分搜索树)中lower 和upper的技巧
- Python 中的lower()、upper()函数和str\chr
- python 列表生成式、lower()和upper()的使用
- oracle lower函数和upper函数
- Oracle lower(Upper)函数
- oracle-lower(),upper()函数
- python upper(),lower(),title(),capitalize()
- lower-bound和upper-bound
- iOS 改变字母的大小写
- 实战c++中的string系列--string的初始化、删除、转大小写(construct erase upper-lower)
- python字符串title(),upper(),lower(),capitalize(),swapcase()
- Oracle常用函数 REPLACE() 、 LOWER() 、 UPPER() 篇
- (c语言)字符串的大小写字母转化函数
- Upper Page和Lower Page那些事儿
- 14-5(2)字符串中大小写字母的统计
- java系统高并发解决方案
- js数据类型有哪些
- 我的RxJava入门(二)
- 文本词频Countvectorizer
- 使用Spring MVC统一异常处理实战
- python中改变字母大小写的函数upper()和lower()
- html5 调用手机相册并显示多图片
- windows——消息
- 常用系统函数
- MySQL查询优化
- 微信聊天机器人、Python、中文词云
- 数学中的各类曲线函数
- Java开发者写SQL时常犯的10个错误
- MYSQL 对null和空字符串正序排序靠前的解决方法