Thursday, 19 September 2013

Trouble removing extra hyphens from string in python?

Trouble removing extra hyphens from string in python?

def checkio(line):
list.remove(max("---"))
list.remove(min("--"))
return line
if __name__ == '__main__':
assert checkio('I---like--python') == "I-like-python", 'Example'
$ I am trying to remove the "---" and the "--" from the string I like
python and it does nto seem to be working. Any help?

No comments:

Post a Comment