For Your A (what am i doing wrong?


So every post I've seen says that this code is correct, but it's not working for me. It is telling me that i didn't replace the a's with x's

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

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



Your index is char in your loop. Why aren't you using that? c is undefined. Do you mean to use char instead?


Oh that fixed it! I'm not sure why i used c's


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