几行代码的小工具,用于进行如下转换
TRANSACTIONS ON CLOUD COMPUTING
=》
Transactions On Cloud Computing
复制代码 代码如下:
orig = 'TRANSACTIONS ON CLOUD COMPUTING'
splited = orig.split(' ')
handled = ''
for word in splited:
word = word[0] + word[1:].lower()
handled += (' ' + word)
handled = handled[1:]
print handled
#handled is 'Transactions On Cloud Computing'
最后
以上就是温婉马里奥最近收集整理的关于Python写的英文字符大小写转换代码示例的全部内容,更多相关Python写内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复