def render_string(string, sub):
 try:
  finalCode = (string % sub)
 except Exception as E:
  i = 0
  while (i <= len(string)):
   try:
    finalCode = (string[0:i] % sub)
   except Exception as F:
    if (str(F) == str(E)):
     raise Exception(((string[0:i] + '<<<< caused exception ') + str(F)))
   i += 1
  assert False
 return finalCode

def render_string ( string , sub ) : try : finalCode = ( string % sub ) except Exception as E : i = 0 while ( i <= len ( string ) ) : try : finalCode = ( string [ 0 : i ] % sub ) except Exception as F : if ( str ( F ) == str ( E ) ) : raise Exception ( ( ( string [ 0 : i ] + '<<<< caused exception ' ) + str ( F ) ) ) i += 1 assert False return finalCode
string: a string .