python字符串大小写转换

# coding=utf-8

s='ADVERSARIAL EXAMPLES IN THE PHYSICAL WORLD'
print s.lower() #所有转小写
print s.upper() #所有转大写
print s.capitalize() #行首字母大写,其他小写
print s.title() #每个单词首字母大写,其他小写

 

posted @ 2017-05-22 10:51  wxiaoli  阅读(2706)  评论(0编辑  收藏  举报