It's often a good idea to clean up any potential leading and trailing white spaces in your data set early on in your process.
The Data Quality indicators in the Data Viewer provide you with information on potential issues with white space characters in string fields in your data.
Trim Fields node
A quick way to trim leading and trailing white spaces across ALL your fields in the one step is to connect your dataset to a Trim Fields node, which you can find under Aggregation and Transformation.
You don't need to change any of the properties of the Trim Fields node as the default configuration will work.
Give it a try by simply connecting a Trim Fields node to a Create Data node - no need to change any other properties for either node:
You can read more about the Trim Fields node in the Help: Node help > Aggregation and Transformation > Trim Fields
Python Strip function
If you don't want to apply this blanket rule across your data and instead only want to remove leading and trailing whitespace characters from specific fields, you can instead use the Python strip() function within the new Transform node.
For example, to remove extraneous whitespace from an input field 'myInput', you might include the following in a Transform node:
## ConfigureFields script
# Copy the metadata for all input fields to the output record specification
out1 += in1
# Specify the new field to contain the trimmed values
out1.myInputTrimmed = unicode
## ProcessRecords script
# Copy all input field values to the output record
out1 += in1
# Assign the trimmed string value to the new field
out1.myInputTrimmed = fields['myInput'].strip()
You can read more about the new Transform node in the Help: