o my god, You are such a star man, really I am delighted to see it working so far, so now I need to assign this temperature to an int and then compare it
a massive massive thanks for that.
a massive massive thanks for that.
with open('timeTemp2.txt') as f: for line in f: #print (line.strip()) line = line.split(',') print(line[1].split() [0]) temp = int (line[1].split() [0]) print(temp)just have a look at this chief it gives me an error,
Output:Temperature
Traceback (most recent call last):
File "/Users/smacpro/Desktop/codePython.py", line 25, in <module>
temp = int (line[1].split() [0])
ValueError: invalid literal for int() with base 10: 'Temperature'
what's the cause for this? I think its the header of this column? is it? how can I eliminate it?