Kevin is noticing his space run out! Write a function that removes the spaces from the values and returns an array showing the space decreasing.
For example, running this function on the array ['i', 'have','no','space'] would produce ['i','ihave','ihaveno','ihavenospace'].
from itertools import accumulate


def spacey(array):
    return list(map("".join, accumulate(array)))
from itertools import accumulate


def spacey(array):
    return list(map("".join, accumulate(array)))