I want to create a function that would check if first letter of string is in uppercase. This is what I've came up with so far:
def is_lowercase(word):
if word[0] in range string.ascii_lowercase:
return True
else:
return False
When I try to run it I get this error:
if word[0] in range string.ascii_lowercase
^
SyntaxError: invalid syntax
Can someone have a look and advise what I'm doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…