Oh no! Ghosts have reportedly swarmed the city. It's your job to get rid of them and save the day!
In this kata, strings represent buildings while whitespaces within those strings represent ghosts.
So what are you waiting for? Return the building(string) without any ghosts(whitespaces)!
Example:
Should return:
If the building contains no ghosts, return the string:
from re import match, sub
def ghostbusters(building): return sub(r'\s', '', building) if match(r'.*\s.*', building) else "You just wanted my autograph didn't you?"
from re import match, sub
def ghostbusters(building): return sub(r'\s', '', building) if match(r'.*\s.*', building) else "You just wanted my autograph didn't you?"