12 loop problem


#1

My code seems perfect, yet it throws a problem:
"Oops, try again. Did you replace all of the "A"s and "a"s with "X"s? It looks like you printed "" instead of "X b i r d i n t h e h X n d . . ."."

and its printing "X b i r d i n t h e h X n d . . .None" (which is great)

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

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

#2

@rubysurfer09367,
Try it with

phrase = "A bird in the hand..."
nphrase = ""
for char in phrase:
    if char == "A" or char == "a":
        nphrase += "X"
    else:
        nphrase += char
print nphrase

#3

You have everything correct, except this portion at the end of the code which was preset for the example.

Don't delete this print statement!

print

So it should look like this as a whole

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

# Add your for loop
for char in phrase:
    if char == 'A' or char == 'a':
        print "X",
    else:
        print char,




#Don't delete this print statement!
print