def formatListLines(msgs):
 i = 0
 for size in msgs:
  i += 1
  (yield ('%d %d\r\n' % (i, size)))

def formatListLines ( msgs ) : i = 0 for size in msgs : i += 1 ( yield ( '%d %d\r\n' % ( i , size ) ) )
format a list of message sizes appropriately for the lines of a list response .