I can currently have my code return "Yes" for each character, but I'm not sure how to make the code return just ONE Yes at the end of the code, if every word in the sentence was lowercase. Here's what I have
sentence = "hello thEre is this aLL lowercase"
sent = sentence.split(" ")
lower = False
for wd in sent:
for ch in wd:
if ch.islower():
print("Yes")
lower = True
if not ch.islower():
print("No")
lower = False
I know I cannot have print("Yes") in the loop because it will print everytime, but I don't know how to do it any other way. Thanks for any help.