Hey @NeoGeo
Could it possibly be that the inputs are integers? If so, you may need to convert it to a string, this function would only be able to make operations on a string since it uses .strip().
I put this inside of a Python IDE and tested with num1 = "123456789" and num2 = 123456789, num1 worked and num2 didn't, as a catch, you can include MyInput = str(MyInput), like this here:
def ZipCodeFix(MyInput):
MyInput = str(MyInput)
if MyInput is None:
pass
elif MyInput == '':
return None
else:
NoSpaces = MyInput.strip()
if len(NoSpaces) == 9:
output = NoSpaces[:5] + '-' + NoSpaces[5:]
return output
else:
pass
Hope that helps!
Cody