Did you replace all of the "A"s and "a"s with "X"s? It looks like you printed "X bird in the hXnd..." instead of "X b i r d i n t h e h X n d . . ."


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

Add your for loop

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

elif char =='':continue

else:print char

Don't delete this print statement!



Remove the elif statement and you should be good to go.


Sorry, that was a partial lie apparently. Your code comes out with each letter on a separate column correct? Look at the example given and where they place the commas.


Thanks this helped me out. if char == 'A' or char=='a'


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