title: Reading and storing values in list
body: <p>Currently doing project where I use raspberry pi as a monitoring device for motors. In the part of code below I'm trying to read measurements from motor controller and store them in the buffer by 5 values and after print them:</p>
  
  <pre><code>def readFromSerial(prefix, command):
      buffer = []
      ser.write(command.encode()) #send data to controller
      data = ser.readline().decode().strip() #receive data from controller
      #Checking if data is received and extracting value
      if prefix in data:
          value = int(data.split('=')[1])
          #print("Asked: " + str(command) + ". Got value: " + str(value))
          buffer.append(value)
          if len(buffer) &gt; 5:
              print(*buffer)
              buffer = buffer[5:]
      else:
          print("Message is not received")
  </code></pre>
  
  <p>However when I'm trying to run the code, <code>print(*buffer)</code> is not printing anything in the terminal. Maybe I'm not storing values to buffer correctly but I can't figure out mistake by myself so any help is greatly appreciated.</p>