d = random,randint(1,30)
data = [d, strftime("%Y%m%d %H%M%S", gmtime())] #random num , system time
client.publish("gas", str(data)]
This is a part of my python code which is ver2. I'm trying to send a list using MQTT. However, If I write bytearray instead of str which is third line It says "ValueError: string must be of size 1". So I wrote str then make it sting type Can I send a just list which is NOT string type.