Write a function to compact a string in place: A. strip whitespace from the string. B. remove duplicate characters if they are next to each other
Sigiloso
def main(): chars = "".join(sys.argv[1:]).replace(" ", "") print("".join([curr for curr, nxt in izip_longest(chars, chars[1:]) if curr != nxt]))