在python中使用lower()函數將字符串中大小字符轉換為小寫的方法
lower:lower()函數的作用是轉換字符串中所有大寫字符為小寫。
lower()函數語法:
str.lower()
lower()函數使用方法:
str = "HELLO WORLD !!";print str.lower();
str = "HELLO WORLD !!";
print str.lower();
輸出結果為:
hello world !!