Forloop


#1

Here is my right code:

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,

----> if I don't use comma between if and else, what's the difference?

Following is the code without comma
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

Don't delete this print statement!

print

`


#2

the , will print everything to the same line. Otherwise you get a new line everytime


#3