For your A


#1

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

I am running the above code , still i am getting the letters printed vertically having , after the print 'X' . Please help

Output :X
b
i
r
d

i
n

t
h
e

h
X n
d
.
.
.


#2

Your else part's print creating new line character!
hint**
Add a comma after char ?


#3

Cheers ! get it corrected


#4

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