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

2026-02-13 20:10:43

1、打开pycharm编辑器。

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

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

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

3、新建一个变量test5

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

4、利用函数isupper来实现。

test5.isupper()

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

5、将结果打印出来。

print(test5.isupper())

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

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

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

7、运行该程序。

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

相关推荐
  • 阅读量:159
  • 阅读量:99
  • 阅读量:188
  • 阅读量:109
  • 阅读量:96
  • 猜你喜欢