# 判断传单词首字母是否为大写
def ckWord(*args):
for arg in args:
if arg[0].isupper():
print(True)
else:
print(False)
ckWord(input("请输入测试单词: "))
测试结果:
➜ pyPractice python3 test.py
请输入测试单词: Hello
True
➜ pyPractice python3 test.py
请输入测试单词: hELLO
False