Python中字符串轉換大小寫的方法有三種:
s = "hello" s_upper = s.upper() print(s_upper) # 輸出:HELLO
s = "HELLO" s_lower = s.lower() print(s_lower) # 輸出:hello
s = "hello world" s_title = s.title() print(s_title) # 輸出:Hello World
億速云公眾號
手機網站二維碼
Copyright ? Yisu Cloud Ltd. All Rights Reserved. 2018 版權所有
廣州億速云計算有限公司粵ICP備17096448號-1 粵公網安備 44010402001142號增值電信業務經營許可證編號:B1-20181529