title: Convert python list of string to bytearray
body: <p>I would write a list on serial COM through pySerial.</p>
  
  <p>I create a list of string, where each string is a parameter, and then I pass the list to serial write function. There is an error because I cannot write list of string directly on serial</p>
  
  <p>This is my code:</p>
  
  <pre><code>import datetime
  import time
  import sys
  import serial
  
  date = datetime.datetime.now()
  dateStr = str(date.strftime('%d-%m-%Y'))
  unixTime = int(time.time())
  crc = str("1234")
  
  
  packet = list()
  
  packet.append('test')
  packet.append(dateStr)
  packet.append(unixTime)
  packet.append('4')
  packet.append('81')
  packet.append('1')
  packet.append('0')
  
  packet.append('00.7')
  packet.append('4')
  packet.append('9')
  packet.append('0')
  
  packet.append('18.8')
  packet.append('5')
  packet.append('3')
  packet.append('0')
  
  packet.append('15.3')
  packet.append('4')
  packet.append('6')
  packet.append('0')
  
  packet.append('2')
  packet.append('0')
  packet.append('13')
  packet.append('0')
  
  packet.append('0')
  packet.append('0')
  packet.append('185.6')
  
  # add semicolon between list elements
  serialCOM.write(packet)
  </code></pre>
  
  <p>Is there a way to concatenate each list elements into a list or bytearray?</p>
  
  <p>Furthermore I need to add a semicolon between each list elements.</p>
  
  <p>Thanks for the help!</p>