float() is perfectly fine with trailing whitespace.