Apple interview question

remove spaces from a string in python (without using the remove function)