title: How to use logger to print a list in just one line in Python
body: <p>I want to print a list using logging in only one line in Python 3.6. Currently my code looks like this.</p>
  
  <pre><code>logger = logging.getLogger()
  logger.setLevel(log_level)
  ch = logging.StreamHandler(sys.stdout)
  ch.setLevel(log_level)
  formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
  ch.setFormatter(formatter)
  logger.addHandler(ch)
  
  # some codes in-between
  
  num_list = [1, 2, 3, 4, 5]
  logger.info("Numbers in num_list are: ")
  for item in num_list:
      logger.info(item)
  </code></pre>
  
  <p>What I want to get is</p>
  
  <pre><code>2018-07-23 17:29:30,200 - root - INFO - Numbers in num_list are: 1 2 3 4 5
  </code></pre>
  
  <p>However, I would get </p>
  
  <pre><code>2018-07-23 17:29:30,200 - root - INFO - Numbers in num_list are:
  2018-07-23 17:29:30,200 - root - INFO - 1
  2018-07-23 17:29:30,200 - root - INFO - 2
  2018-07-23 17:29:30,200 - root - INFO - 3
  2018-07-23 17:29:30,200 - root - INFO - 4
  2018-07-23 17:29:30,200 - root - INFO - 5
  </code></pre>
  
  <p>I know if I used <code>print</code> to output, I could have use <code>print(item, end=" ")</code> to explicitly change what follows the output. However, it seems that the logging won't accept <code>end</code> as an input parameter.</p>
  
  <p>Does anyone have any ideas how I could get the desired output? Many thanks!</p>