Problem with automatic corrector in (for a) practice


Oops, try again. Did you replace all of the "A"s and "a"s with "X"s? It looks like you printed "x b i r d i n t h e h x n d . . ." instead of "X b i r d i n t h e h X n d . . .".

the code run fine, and print correcly .
print this:
x b i r d i n t h e h x n d . . .

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

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

#Don't delete this print statement!


x and X are different characters


why i print x b i r d i n t h e h x n d . . . with spaces in the post but when published the post
dont have spaces?


Perhaps the browser removes them, same as if you have duplicate spaces in text in these posts
If you open a file with the below content this in a browser, only one space shows.

hello                        world

while for this it would show them all:

<pre>hello                        world</pre>


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