要將字母全部變為小寫,可以使用字符串的`lower()`方法。下面是一個示例:
string = "Hello World" lowercase_string = string.lower() print(lowercase_string)
輸出結果為:
hello world