replace '%s' in string " Optimized from %s operations to %s operations." with lengths of operations and ew_operations, respectively,
self . stdout . write ( " Optimized from %s operations to %s operations." % ( len ( operations ) , len ( new_operations ) ) )