It is possible to do this using the **Calculate Value** tool, see http://gis.stackexchange.com/questions/25584/add-arbitrary-code-to-arcgis-model-builder