Indeed interview question

write an algorithm to validate spacing in a Python program