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 . . ."


#1

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!

print


#2

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


#3

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.


#4

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


#5

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