Hello,
I have this programm :
def remove_letter(letter, strng):
"""
>>> remove_letter('a', 'apple')
'pple'
>>> remove_letter('a', 'banana')
'bnn'
>>> remove_letter('z', 'banana')
'banana'
>>> remove_letter('i', 'Mississippi')
'Msssspp'
"""
antwoord=""
for letter in strng:
print letter, strng
if letter in strng:
print "false"
else:
print "true"
return antwoord
x=remove_letter('a', 'apple')
print x
But now everything is false even a in apple.
What is here wrong ?
Roelof
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor