my_string = "   hello    world   "
new_string = my_string.replace(" ", "")
print(new_string)