成免费的crm,久久国产精品新农夫导航新妓网,恋夜秀场全部视频安卓手机,女校花强奷在线播放A级

Python swapcase()方法

Python swapcase()方法

Python 字符串Python 字符串

Python swapcase() 方法用于對字符串的大小寫字母進行轉換。

 

語法

swapcase()方法語法:

str.swapcase();

 

參數

  • NA。

 

返回值

返回大小寫字母轉換后生成的新字符串。

 

實例

以下實例展示了swapcase()函數的使用方法:

#!/usr/bin/python
 
str = "this is string example....wow/b64/";
print str.swapcase();
 
str = "THIS IS STRING EXAMPLE....WOW/b64/";
print str.swapcase();

以上實例輸出結果如下:

THIS IS STRING EXAMPLE....WOW/b64/
this is string example....wow/b64/

Python 字符串Python 字符串

下一節(jié):Python title()方法

Python 教程

相關文章