Python编程:如何使用字符串的casefold()方法
1、首先按下“Win+R”组合键,打开运行窗口。

2、在打开文本框输入“cmd”,点击确定。

3、在打开的cmd窗口中,输入:“python”,点击Enter键。

4、在Python环境中,输入:“txt = "Hello, And Welcome To My World!"”,点击Enter键。

5、在Python环境中,输入:“x = txt.casefold()”,点击Enter键。

6、在Python环境中,输入:“print(x)”。

7、点击Enter键,即可使用Python字符串的casefold()方法把“txt”字符串的所有字母都设置为小写形式。
