For your A


I don't understand how

print char,

will cause the code to print horizontally and there are no commas?

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

# Add your for loop

for char in phrase:
    if char == "A" or char == "a":
        print "X "
        print char,


The , character after the print statement means that the next print statement will keep printing on the same line. I you remove the empty print statement None will be on the same line as X bird in the hxnd... thus resulting in an error.


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