For your A (explanation request)


I got the answer correct, but I am wondering why the last empty print is needed, and what purpose it serves. Thanks!

phrase = "A bird in the hand..."

# Add your for loop
for char in phrase:
    if char == "A" or char == "a":
        print "X",
        print char,
#Don't delete this print statement!


it needed for the exercise validation.


So what is a good rule of thumb for us to know when we need an empty print
statement at the end?


there isn't, this the only exercise where this occurs. The rule of thumb is that the print statement is already present, and there is a comment telling you not to remove the empty print statement


lol, okay thank you @stetim94! It was the first time I ran into this odd thing of putting an empty print statement at the end and got confused. Thanks for clarifying!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.