养生 装修 购物 美食 感冒 便秘 营销 加盟 小吃 火锅 管理 创业 搭配 减肥 培训 旅游

python中怎样判断字符串是不是大写

时间:2024-10-17 18:28:44

python中怎样判断字符串是不是大写?

方法/步骤

1、打开pycharm编辑器。

python中怎样判断字符串是不是大写

2、写上自己的注释内容。

python中怎样判断字符串是不是大写

3、新建一个变量test5

python中怎样判断字符串是不是大写

4、利用函数isupper来实现。test5.isupper()

python中怎样判断字符串是不是大写

5、将结果打印出来。print(test5.isupper())

python中怎样判断字符串是不是大写

6、在窗口中选择"run"->"run"

python中怎样判断字符串是不是大写

7、运行该程序。

python中怎样判断字符串是不是大写

© 一点知识