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

2026-04-11 19:40:19

1、打开pycharm编辑器。

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

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

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

3、新建一个变量test5

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

4、利用函数isupper来实现。

test5.isupper()

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

5、将结果打印出来。

print(test5.isupper())

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

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

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

7、运行该程序。

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

相关推荐
  • 阅读量:100
  • 阅读量:129
  • 阅读量:64
  • 阅读量:65
  • 阅读量:117
  • 猜你喜欢