python 3:str.upper()与str.lower()(使字符串字母全部大写或小写)
1 name = "Hello,World! Hello,Python!" 2 print(name.upper()) #字母全部大写 3 print(name.lower()) #字母全部小写
1 运行结果将会是: 2 HELLO,WORLD!HELLO,PYTHON! 3 hello,world!hello,python!
1 name = "Hello,World! Hello,Python!" 2 print(name.upper()) #字母全部大写 3 print(name.lower()) #字母全部小写
1 运行结果将会是: 2 HELLO,WORLD!HELLO,PYTHON! 3 hello,world!hello,python!