Removing spaces in list to string