Is there a way to convert a string from uppercase, or even part uppercase to lowercase?
(有没有一种方法可以将字符串从大写字母甚至部分大写字母转换为小写字母?)
For example, "Kilometers" → "kilometers".
(例如,“公里”→“公里”。)
ask by Benjamin Didur translate from soIs there a way to convert a string from uppercase, or even part uppercase to lowercase?
(有没有一种方法可以将字符串从大写字母甚至部分大写字母转换为小写字母?)
For example, "Kilometers" → "kilometers".
(例如,“公里”→“公里”。)
ask by Benjamin Didur translate from so Use .lower()
- For example:
(使用.lower()
-例如:)
s = "Kilometer"
print(s.lower())
The official 2.x documentation is here: str.lower()
(官方2.x文档在这里: str.lower()
)
The official 3.x documentation is here: str.lower()
(正式的3.x文档在这里: str.lower()
)