I have a set of data I'm working with that appears in a text file like: Sensor Data
I want to extract the RSSI data from each line of code.
with open ('datasensorsmall.txt') as f:
for line in f:
TS, Drop, RX, TX, RSSI, CRCData, light, temp, humidity = line.split(" ")
print(RSSI)
However, it only prints the first RSSI value and then I get an error value that says:
"ValueError: not enough values to unpack (expected 9, got 1)".
How do I solve` this?

line.split()orline.split('\t')(if you don't want to split on all whitespace).